[PATCH] scsi: remove reference to scsi_show_extd_sense()
In commit 2104551969e8 ("scsi: use per-cpu buffer for formatting sense"), function scsi_show_extd_sense() was removed, switching use over to scsi_format_extd_sense(). Remove last reference to scsi_show_extd_sense() in include/scsi/scsi_dbg.h. Signed-off-by: John Pittman <jpitt...@redhat.com> --- include/scsi/scsi_dbg.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/scsi/scsi_dbg.h b/include/scsi/scsi_dbg.h index 04e0679..e03bd9d 100644 --- a/include/scsi/scsi_dbg.h +++ b/include/scsi/scsi_dbg.h @@ -11,8 +11,6 @@ struct scsi_sense_hdr; extern void scsi_print_command(struct scsi_cmnd *); extern size_t __scsi_format_command(char *, size_t, const unsigned char *, size_t); -extern void scsi_show_extd_sense(const struct scsi_device *, const char *, -unsigned char, unsigned char); extern void scsi_print_sense_hdr(const struct scsi_device *, const char *, const struct scsi_sense_hdr *); extern void scsi_print_sense(const struct scsi_cmnd *); -- 2.7.5
[PATCH] scsi: scsi_dh_alua: Correct comment for alua_alloc_pg()
In the comment for function alua_alloc_pg() the argument '@h' is mistakenly referred to. Fix this by replacing it with the correct argument reference, '@tpgs', and provide a short description. Signed-off-by: John Pittman <jpitt...@redhat.com> --- drivers/scsi/device_handler/scsi_dh_alua.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c index 4b44325..ab89e42 100644 --- a/drivers/scsi/device_handler/scsi_dh_alua.c +++ b/drivers/scsi/device_handler/scsi_dh_alua.c @@ -214,8 +214,8 @@ static struct alua_port_group *alua_find_get_pg(char *id_str, size_t id_size, /* * alua_alloc_pg - Allocate a new port_group structure * @sdev: scsi device - * @h: alua device_handler data * @group_id: port group id + * @tpgs: target port group settings * * Allocate a new port_group structure for a given * device. -- 2.7.5
Re: [PATCH] scsi: scsi_debug: Fix pointer stying issues
Ha! Thanks for catching the typo Douglas. On Fri, Feb 9, 2018 at 9:53 PM, Douglas Gilbert <dgilb...@interlog.com> wrote: > As per the subject line, I wouldn't mind putting these changes in with > the pigs :-) > > On 2018-02-09 09:12 PM, John Pittman wrote: >> >> Pointer styling issues exposed by checkpatch.pl in scsi_debug.c: >> >> ERROR: "foo * bar" should be "foo *bar" >> >> Fixed 37 total errors reported. >> >> Signed-off-by: John Pittman <jpitt...@redhat.com> > > > Ack-ed by: Douglas Gilbert <dgilb...@interlog.com> > > >> --- >> drivers/scsi/scsi_debug.c | 72 >> +++ >> 1 file changed, 36 insertions(+), 36 deletions(-) >> >> diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c >> index a5986da..a1f867f 100644 >> --- a/drivers/scsi/scsi_debug.c >> +++ b/drivers/scsi/scsi_debug.c >> @@ -1155,8 +1155,8 @@ static int inquiry_vpd_84(unsigned char *arr) >> static int inquiry_vpd_85(unsigned char *arr) >> { >> int num = 0; >> - const char * na1 = "https://www.kernel.org/config;; >> - const char * na2 = "http://www.kernel.org/log;; >> + const char *na1 = "https://www.kernel.org/config;; >> + const char *na2 = "http://www.kernel.org/log;; >> int plen, olen; >> arr[num++] = 0x1; /* lu, storage config */ >> @@ -1372,7 +1372,7 @@ static int inquiry_vpd_b2(unsigned char *arr) >> static int resp_inquiry(struct scsi_cmnd *scp, struct sdebug_dev_info >> *devip) >> { >> unsigned char pq_pdt; >> - unsigned char * arr; >> + unsigned char *arr; >> unsigned char *cmd = scp->cmnd; >> int alloc_len, n, ret; >> bool have_wlun, is_disk; >> @@ -1523,10 +1523,10 @@ static int resp_inquiry(struct scsi_cmnd *scp, >> struct sdebug_dev_info *devip) >> static unsigned char iec_m_pg[] = {0x1c, 0xa, 0x08, 0, 0, 0, 0, 0, >>0, 0, 0x0, 0x0}; >> -static int resp_requests(struct scsi_cmnd * scp, >> -struct sdebug_dev_info * devip) >> +static int resp_requests(struct scsi_cmnd *scp, >> +struct sdebug_dev_info *devip) >> { >> - unsigned char * sbuff; >> + unsigned char *sbuff; >> unsigned char *cmd = scp->cmnd; >> unsigned char arr[SCSI_SENSE_BUFFERSIZE]; >> bool dsense; >> @@ -1584,8 +1584,8 @@ static int resp_requests(struct scsi_cmnd * scp, >> return fill_from_dev_buffer(scp, arr, len); >> } >> -static int resp_start_stop(struct scsi_cmnd * scp, >> - struct sdebug_dev_info * devip) >> +static int resp_start_stop(struct scsi_cmnd *scp, >> + struct sdebug_dev_info *devip) >> { >> unsigned char *cmd = scp->cmnd; >> int power_cond, stop; >> @@ -1612,8 +1612,8 @@ static sector_t get_sdebug_capacity(void) >> } >> #define SDEBUG_READCAP_ARR_SZ 8 >> -static int resp_readcap(struct scsi_cmnd * scp, >> - struct sdebug_dev_info * devip) >> +static int resp_readcap(struct scsi_cmnd *scp, >> + struct sdebug_dev_info *devip) >> { >> unsigned char arr[SDEBUG_READCAP_ARR_SZ]; >> unsigned int capac; >> @@ -1631,8 +1631,8 @@ static int resp_readcap(struct scsi_cmnd * scp, >> } >> #define SDEBUG_READCAP16_ARR_SZ 32 >> -static int resp_readcap16(struct scsi_cmnd * scp, >> - struct sdebug_dev_info * devip) >> +static int resp_readcap16(struct scsi_cmnd *scp, >> + struct sdebug_dev_info *devip) >> { >> unsigned char *cmd = scp->cmnd; >> unsigned char arr[SDEBUG_READCAP16_ARR_SZ]; >> @@ -1670,11 +1670,11 @@ static int resp_readcap16(struct scsi_cmnd * scp, >> #define SDEBUG_MAX_TGTPGS_ARR_SZ 1412 >> -static int resp_report_tgtpgs(struct scsi_cmnd * scp, >> - struct sdebug_dev_info * devip) >> +static int resp_report_tgtpgs(struct scsi_cmnd *scp, >> + struct sdebug_dev_info *devip) >> { >> unsigned char *cmd = scp->cmnd; >> - unsigned char * arr; >> + unsigned char *arr; >> int host_no = devip->sdbg_host->shost->host_no; >> int n, ret, alen, rlen; >> int port_group_a, port_group_b, po
[PATCH] scsi: scsi_debug: Fix pointer stying issues
Pointer styling issues exposed by checkpatch.pl in scsi_debug.c: ERROR: "foo * bar" should be "foo *bar" Fixed 37 total errors reported. Signed-off-by: John Pittman <jpitt...@redhat.com> --- drivers/scsi/scsi_debug.c | 72 +++ 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index a5986da..a1f867f 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c @@ -1155,8 +1155,8 @@ static int inquiry_vpd_84(unsigned char *arr) static int inquiry_vpd_85(unsigned char *arr) { int num = 0; - const char * na1 = "https://www.kernel.org/config;; - const char * na2 = "http://www.kernel.org/log;; + const char *na1 = "https://www.kernel.org/config;; + const char *na2 = "http://www.kernel.org/log;; int plen, olen; arr[num++] = 0x1; /* lu, storage config */ @@ -1372,7 +1372,7 @@ static int inquiry_vpd_b2(unsigned char *arr) static int resp_inquiry(struct scsi_cmnd *scp, struct sdebug_dev_info *devip) { unsigned char pq_pdt; - unsigned char * arr; + unsigned char *arr; unsigned char *cmd = scp->cmnd; int alloc_len, n, ret; bool have_wlun, is_disk; @@ -1523,10 +1523,10 @@ static int resp_inquiry(struct scsi_cmnd *scp, struct sdebug_dev_info *devip) static unsigned char iec_m_pg[] = {0x1c, 0xa, 0x08, 0, 0, 0, 0, 0, 0, 0, 0x0, 0x0}; -static int resp_requests(struct scsi_cmnd * scp, -struct sdebug_dev_info * devip) +static int resp_requests(struct scsi_cmnd *scp, +struct sdebug_dev_info *devip) { - unsigned char * sbuff; + unsigned char *sbuff; unsigned char *cmd = scp->cmnd; unsigned char arr[SCSI_SENSE_BUFFERSIZE]; bool dsense; @@ -1584,8 +1584,8 @@ static int resp_requests(struct scsi_cmnd * scp, return fill_from_dev_buffer(scp, arr, len); } -static int resp_start_stop(struct scsi_cmnd * scp, - struct sdebug_dev_info * devip) +static int resp_start_stop(struct scsi_cmnd *scp, + struct sdebug_dev_info *devip) { unsigned char *cmd = scp->cmnd; int power_cond, stop; @@ -1612,8 +1612,8 @@ static sector_t get_sdebug_capacity(void) } #define SDEBUG_READCAP_ARR_SZ 8 -static int resp_readcap(struct scsi_cmnd * scp, - struct sdebug_dev_info * devip) +static int resp_readcap(struct scsi_cmnd *scp, + struct sdebug_dev_info *devip) { unsigned char arr[SDEBUG_READCAP_ARR_SZ]; unsigned int capac; @@ -1631,8 +1631,8 @@ static int resp_readcap(struct scsi_cmnd * scp, } #define SDEBUG_READCAP16_ARR_SZ 32 -static int resp_readcap16(struct scsi_cmnd * scp, - struct sdebug_dev_info * devip) +static int resp_readcap16(struct scsi_cmnd *scp, + struct sdebug_dev_info *devip) { unsigned char *cmd = scp->cmnd; unsigned char arr[SDEBUG_READCAP16_ARR_SZ]; @@ -1670,11 +1670,11 @@ static int resp_readcap16(struct scsi_cmnd * scp, #define SDEBUG_MAX_TGTPGS_ARR_SZ 1412 -static int resp_report_tgtpgs(struct scsi_cmnd * scp, - struct sdebug_dev_info * devip) +static int resp_report_tgtpgs(struct scsi_cmnd *scp, + struct sdebug_dev_info *devip) { unsigned char *cmd = scp->cmnd; - unsigned char * arr; + unsigned char *arr; int host_no = devip->sdbg_host->shost->host_no; int n, ret, alen, rlen; int port_group_a, port_group_b, port_a, port_b; @@ -1926,7 +1926,7 @@ static int resp_rsup_tmfs(struct scsi_cmnd *scp, /* <> */ -static int resp_err_recov_pg(unsigned char * p, int pcontrol, int target) +static int resp_err_recov_pg(unsigned char *p, int pcontrol, int target) { /* Read-Write Error Recovery page for mode_sense */ unsigned char err_recov_pg[] = {0x1, 0xa, 0xc0, 11, 240, 0, 0, 0, 5, 0, 0xff, 0xff}; @@ -1937,7 +1937,7 @@ static int resp_err_recov_pg(unsigned char * p, int pcontrol, int target) return sizeof(err_recov_pg); } -static int resp_disconnect_pg(unsigned char * p, int pcontrol, int target) +static int resp_disconnect_pg(unsigned char *p, int pcontrol, int target) { /* Disconnect-Reconnect page for mode_sense */ unsigned char disconnect_pg[] = {0x2, 0xe, 128, 128, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; @@ -1948,7 +1948,7 @@ static int resp_disconnect_pg(unsigned char * p, int pcontrol, int target) return sizeof(disconnect_pg); } -static int resp_format_pg(unsigned char * p, int pcontrol, int target) +static int resp_format_pg(unsigned char *p, int pcontrol, int target) {
[PATCH] sd: Cleaned up comment references to @sdp argument explanation.
In sd.c there are two comment references to 'struct scsi_device *sdp' as an argument. One of the references has a typo and the other should be a reference to 'struct device *dev' instead. Fixed by correcting the typo in the first and changing the explanation in the second. Signed-off-by: John Pittman <jpitt...@redhat.com> Edited to --- drivers/scsi/sd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index b193304..52105d8 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -703,7 +703,7 @@ static void sd_config_discard(struct scsi_disk *sdkp, unsigned int mode) /** * sd_setup_discard_cmnd - unmap blocks on thinly provisioned device - * @sdp: scsi device to operate one + * @sdp: scsi device to operate on * @rq: Request to prepare * * Will issue either UNMAP or WRITE SAME(16) depending on preference @@ -3192,7 +3192,7 @@ static int sd_probe(struct device *dev) * sd_remove - called whenever a scsi disk (previously recognized by * sd_probe) is detached from the system. It is called (potentially * multiple times) during sd module unload. - * @sdp: pointer to mid level scsi device object + * @dev: pointer to device object * * Note: this function is invoked from the scsi mid-level. * This function potentially frees up a device name (e.g. /dev/sdc) -- 2.5.5 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] sd: Cleaned up comment references to @sdp argument explanation.
In sd.c there are two comment references to 'struct scsi_device *sdp' as an argument. One of the references has a typo and the other should be a reference to 'struct device *dev' instead. Fixed by correcting the typo in the first and changing the explanation in the second. Signed-off-by: John Pittman <jpitt...@redhat.com> Edited to --- drivers/scsi/sd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index b193304..52105d8 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -703,7 +703,7 @@ static void sd_config_discard(struct scsi_disk *sdkp, unsigned int mode) /** * sd_setup_discard_cmnd - unmap blocks on thinly provisioned device - * @sdp: scsi device to operate one + * @sdp: scsi device to operate on * @rq: Request to prepare * * Will issue either UNMAP or WRITE SAME(16) depending on preference @@ -3192,7 +3192,7 @@ static int sd_probe(struct device *dev) * sd_remove - called whenever a scsi disk (previously recognized by * sd_probe) is detached from the system. It is called (potentially * multiple times) during sd module unload. - * @sdp: pointer to mid level scsi device object + * @dev: pointer to device object * * Note: this function is invoked from the scsi mid-level. * This function potentially frees up a device name (e.g. /dev/sdc) -- 2.5.5 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html