Skip to content

Commit 81d3f50

Browse files
damien-lemoalmartinkpetersen
authored andcommitted
scsi: core: Fix scsi_mode_select() interface
The modepage argument is unused. Remove it. Link: https://lore.kernel.org/r/20210929091744.706003-3-damien.lemoal@wdc.com Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com> Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 4d516e4 commit 81d3f50

3 files changed

Lines changed: 6 additions & 9 deletions

File tree

drivers/scsi/scsi_lib.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2026,7 +2026,6 @@ void scsi_exit_queue(void)
20262026
* @sdev: SCSI device to be queried
20272027
* @pf: Page format bit (1 == standard, 0 == vendor specific)
20282028
* @sp: Save page bit (0 == don't save, 1 == save)
2029-
* @modepage: mode page being requested
20302029
* @buffer: request buffer (may not be smaller than eight bytes)
20312030
* @len: length of request buffer.
20322031
* @timeout: command timeout
@@ -2039,10 +2038,9 @@ void scsi_exit_queue(void)
20392038
* status on error
20402039
*
20412040
*/
2042-
int
2043-
scsi_mode_select(struct scsi_device *sdev, int pf, int sp, int modepage,
2044-
unsigned char *buffer, int len, int timeout, int retries,
2045-
struct scsi_mode_data *data, struct scsi_sense_hdr *sshdr)
2041+
int scsi_mode_select(struct scsi_device *sdev, int pf, int sp,
2042+
unsigned char *buffer, int len, int timeout, int retries,
2043+
struct scsi_mode_data *data, struct scsi_sense_hdr *sshdr)
20462044
{
20472045
unsigned char cmd[10];
20482046
unsigned char *real_buffer;

drivers/scsi/sd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ cache_type_store(struct device *dev, struct device_attribute *attr,
209209
*/
210210
data.device_specific = 0;
211211

212-
if (scsi_mode_select(sdp, 1, sp, 8, buffer_data, len, SD_TIMEOUT,
212+
if (scsi_mode_select(sdp, 1, sp, buffer_data, len, SD_TIMEOUT,
213213
sdkp->max_retries, &data, &sshdr)) {
214214
if (scsi_sense_valid(&sshdr))
215215
sd_print_sense_hdr(sdkp, &sshdr);

include/scsi/scsi_device.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -415,9 +415,8 @@ extern int scsi_mode_sense(struct scsi_device *sdev, int dbd, int modepage,
415415
int retries, struct scsi_mode_data *data,
416416
struct scsi_sense_hdr *);
417417
extern int scsi_mode_select(struct scsi_device *sdev, int pf, int sp,
418-
int modepage, unsigned char *buffer, int len,
419-
int timeout, int retries,
420-
struct scsi_mode_data *data,
418+
unsigned char *buffer, int len, int timeout,
419+
int retries, struct scsi_mode_data *data,
421420
struct scsi_sense_hdr *);
422421
extern int scsi_test_unit_ready(struct scsi_device *sdev, int timeout,
423422
int retries, struct scsi_sense_hdr *sshdr);

0 commit comments

Comments
 (0)