Re: [PATCH] scsi: nsp32: fix logic bug in error handling

2017-10-15 Thread Masanori Goto
2017-09-05 16:51 GMT+09:00 Arnd Bergmann :
> gcc-8 points out a logic error that has existed since the start
> of the git history:
>
> drivers/scsi/nsp32.c: In function 'nsp32_selection_autoscsi':
> drivers/scsi/nsp32.c:607:27: error: bitwise comparison always evaluates to 
> false [-Werror=tautological-compare]
>   if(((phase & BUSMON_BSY) == 1) || (phase & BUSMON_SEL) == 1) {
>^~
>
> Presumably the author intended to check if one of two bits was
> set, so that's what I'm changing the code to. This will obviously
> change the behavior of the code, hopefully to do the right thing,
> but I have not tested this or checked if the new "(phase & BUSMON_BSY)
> || (phase & BUSMON_SEL)" condition should indeed be treated as a
> fatal error.
>

This is what I originally intended to, thank you!

Signed-off-by: GOTO Masanori 

> Signed-off-by: Arnd Bergmann 
> ---
>  drivers/scsi/nsp32.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c
> index 107e191bf023..8620ac5d6e41 100644
> --- a/drivers/scsi/nsp32.c
> +++ b/drivers/scsi/nsp32.c
> @@ -604,7 +604,7 @@ static int nsp32_selection_autoscsi(struct scsi_cmnd 
> *SCpnt)
>  * check bus line
>  */
> phase = nsp32_read1(base, SCSI_BUS_MONITOR);
> -   if(((phase & BUSMON_BSY) == 1) || (phase & BUSMON_SEL) == 1) {
> +   if ((phase & BUSMON_BSY) || (phase & BUSMON_SEL)) {
> nsp32_msg(KERN_WARNING, "bus busy");
> SCpnt->result = DID_BUS_BUSY << 16;
> status = 1;
> --
> 2.9.0
>


Re: [PATCH 21/29] scsi: nsp32: constify pci_device_id.

2017-08-06 Thread Masanori Goto
2017-07-30 17:43 GMT+09:00 Arvind Yadav <arvind.yadav...@gmail.com>:
>
> pci_device_id are not supposed to change at runtime. All functions
> working with pci_device_id provided by  work with
> const pci_device_id. So mark the non-const structs as const.
>
> Signed-off-by: Arvind Yadav <arvind.yadav...@gmail.com>

Thank you!  (resending it twice due to an error)

Acked-by: Masanori Goto <go...@debian.or.jp>


> ---
>  drivers/scsi/nsp32.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c
> index 53c8477..1430b3c 100644
> --- a/drivers/scsi/nsp32.c
> +++ b/drivers/scsi/nsp32.c
> @@ -76,7 +76,7 @@ static const char *nsp32_release_version = "1.2";
>  /
>   * Supported hardware
>   */
> -static struct pci_device_id nsp32_pci_table[] = {
> +static const struct pci_device_id nsp32_pci_table[] = {
> {
> .vendor  = PCI_VENDOR_ID_IODATA,
> .device  = PCI_DEVICE_ID_NINJASCSI_32BI_CBSC_II,
> --
> 2.7.4


Re: [PATCH 10/21] [SCSI] nsp32: use mdelay instead of large udelay constants

2013-04-29 Thread Masanori Goto
Oops, you're absolutely correct.  Thanks for the follow up!  Please
change it as follow as you mentioned:

Acked-by: GOTO Masanori go...@debian.or.jp

Best regrads,
-- gotom

2013/4/29 Arnd Bergmann a...@arndb.de:
 On Friday 26 April 2013, Masanori Goto wrote:
 2013/4/25 Arnd Bergmann a...@arndb.de
 
  ARM cannot handle udelay for more than 2 miliseconds, so we
  should use mdelay instead for those.
 

 Singed-off-by: GOTO Masanori go...@debian.or.jp

 Thanks. I assume you mean Acked-by, not Singed-off as in burnt
 or Signed-off as a notification that you have applied it to your
 own git tree.

 I'll keep the patch with an your Acked-by line in my tree unless
 James wants to apply to the scsi tree.

 Arnd

--
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


Re: [PATCH 10/21] [SCSI] nsp32: use mdelay instead of large udelay constants

2013-04-25 Thread Masanori Goto
2013/4/25 Arnd Bergmann a...@arndb.de

 ARM cannot handle udelay for more than 2 miliseconds, so we
 should use mdelay instead for those.


Singed-off-by: GOTO Masanori go...@debian.or.jp

 Signed-off-by: Arnd Bergmann a...@arndb.de
 Cc: GOTO Masanori go...@debian.or.jp
 Cc: YOKOTA Hiroshi yok...@netlab.is.tsukuba.ac.jp
 Cc: James E.J. Bottomley jbottom...@parallels.com
 Cc: linux-scsi@vger.kernel.org
 ---
  drivers/scsi/nsp32.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

 diff --git a/drivers/scsi/nsp32.c b/drivers/scsi/nsp32.c
 index 1e3879d..0665f9c 100644
 --- a/drivers/scsi/nsp32.c
 +++ b/drivers/scsi/nsp32.c
 @@ -2899,7 +2899,7 @@ static void nsp32_do_bus_reset(nsp32_hw_data *data)
  * reset SCSI bus
  */
 nsp32_write1(base, SCSI_BUS_CONTROL, BUSCTL_RST);
 -   udelay(RESET_HOLD_TIME);
 +   mdelay(RESET_HOLD_TIME / 1000);
 nsp32_write1(base, SCSI_BUS_CONTROL, 0);
 for(i = 0; i  5; i++) {
 intrdat = nsp32_read2(base, IRQ_STATUS); /* dummy read */
 --
 1.8.1.2

--
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


Re: [PATCH 319/493] scsi: remove use of __devinitdata

2012-11-23 Thread Masanori Goto
2012/11/23 Guennadi Liakhovetski g.liakhovet...@gmx.de:
 On Mon, 19 Nov 2012, Bill Pemberton wrote:

  drivers/scsi/tmscsim.c  |  2 +-

 Acked-by: Guennadi Liakhovetski g.liakhovet...@gmx.de

Acked-by: GOTO Masanori go...@debian.or.jp

Regards,
-- gotom


 Thanks
 Guennadi
 ---
 Guennadi Liakhovetski, Ph.D.
 Freelance Open-Source Software Developer
 http://www.open-technology.de/

--
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


Re: [PATCH 097/493] scsi: remove use of __devexit_p

2012-11-23 Thread Masanori Goto
2012/11/23 Guennadi Liakhovetski g.liakhovet...@gmx.de:
 On Mon, 19 Nov 2012, Bill Pemberton wrote:

 CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
 needed.

  drivers/scsi/tmscsim.c| 2 +-

 Acked-by: Guennadi Liakhovetski g.liakhovet...@gmx.de

Acked-by: GOTO Masanori go...@debian.or.jp

Regards,
-- gotom


 Thanks
 Guennadi
 ---
 Guennadi Liakhovetski, Ph.D.
 Freelance Open-Source Software Developer
 http://www.open-technology.de/

--
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


Re: [PATCH 425/493] scsi: remove use of __devexit

2012-11-23 Thread Masanori Goto
2012/11/23 Guennadi Liakhovetski g.liakhovet...@gmx.de:
 On Mon, 19 Nov 2012, Bill Pemberton wrote:

 CONFIG_HOTPLUG is going away as an option so __devexit is no
 longer needed.

  drivers/scsi/tmscsim.c| 2 +-

 Acked-by: Guennadi Liakhovetski g.liakhovet...@gmx.de

Acked-by: GOTO Masanori go...@debian.or.jp

Regards,
-- gotom


 Thanks
 Guennadi
 ---
 Guennadi Liakhovetski, Ph.D.
 Freelance Open-Source Software Developer
 http://www.open-technology.de/

--
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