Re: [PATCH] scsi: scsi_debug: Fix pointer stying issues
John, > Pointer styling issues exposed by checkpatch.pl in scsi_debug.c: > >ERROR: "foo * bar" should be "foo *bar" > > Fixed 37 total errors reported. Applied to 4.17/scsi-queue. Thanks! -- Martin K. Petersen Oracle Linux Engineering
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 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 > > > Ack-ed by: Douglas Gilbert > > >> --- >> 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
Re: [PATCH] scsi: scsi_debug: Fix pointer stying issues
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 Ack-ed by: Douglas Gilbert --- 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, in
[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 --- 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) { /* Format device page for mode_sense */ unsigned char format_pg[] = {0x3, 0x16, 0