lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 19 May 2016 14:55:24 +0200
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Finn Thain <fthain@...egraphics.com.au>
Cc:	"James E.J. Bottomley" <James.Bottomley@...senpartnership.com>,
	"Martin K. Petersen" <martin.petersen@...cle.com>,
	Michael Schmitz <schmitzmic@...il.com>,
	"Linux/m68k" <linux-m68k@...r.kernel.org>,
	scsi <linux-scsi@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Ondrej Zary <linux@...nbow-software.org>,
	Sam Creasey <sammy@...my.net>
Subject: Re: [PATCH v4 22/23] mac_scsi: Fix pseudo DMA implementation

Hi Finn,

On Thu, May 19, 2016 at 2:02 PM, Finn Thain <fthain@...egraphics.com.au> wrote:
> On Thu, 19 May 2016, Geert Uytterhoeven wrote:
>> In file included from drivers/scsi/mac_scsi.c:335:
>> drivers/scsi/NCR5380.h:295: warning: `NCR5380_poll_politely' declared inline after being called
>> drivers/scsi/NCR5380.h:295: warning: previous declaration of `NCR5380_poll_politely' was here
>
> Thanks for letting me know. My compiler (v4.4.6) doesn't warn about this.
> What GCC version are you using? Does this (untested) patch help?

The venerable gcc version 4.1.2 20061115 (prerelease) (Ubuntu 4.1.1-21).
Which seems to disobey __attribute__((unused)):

     drivers/scsi/NCR5380.c:385: warning: ‘NCR5380_probe_irq’ defined
but not used

> Index: linux/drivers/scsi/NCR5380.c
> ===================================================================
> --- linux.orig/drivers/scsi/NCR5380.c   2016-05-19 21:31:05.000000000 +1000
> +++ linux/drivers/scsi/NCR5380.c        2016-05-19 21:39:08.000000000 +1000
> @@ -230,13 +230,6 @@ static int NCR5380_poll_politely2(struct
>         return -ETIMEDOUT;
>  }
>
> -static inline int NCR5380_poll_politely(struct Scsi_Host *instance,
> -                                        int reg, int bit, int val, int wait)
> -{
> -       return NCR5380_poll_politely2(instance, reg, bit, val,
> -                                               reg, bit, val, wait);
> -}
> -
>  #if NDEBUG
>  static struct {
>         unsigned char mask;
> Index: linux/drivers/scsi/NCR5380.h
> ===================================================================
> --- linux.orig/drivers/scsi/NCR5380.h   2016-05-19 19:47:06.000000000 +1000
> +++ linux/drivers/scsi/NCR5380.h        2016-05-19 21:40:15.000000000 +1000
> @@ -292,8 +292,10 @@ static void NCR5380_reselect(struct Scsi
>  static struct scsi_cmnd *NCR5380_select(struct Scsi_Host *, struct scsi_cmnd *);
>  static int NCR5380_transfer_dma(struct Scsi_Host *instance, unsigned char *phase, int *count, unsigned char **data);
>  static int NCR5380_transfer_pio(struct Scsi_Host *instance, unsigned char *phase, int *count, unsigned char **data);
> -static int NCR5380_poll_politely(struct Scsi_Host *, int, int, int, int);
>  static int NCR5380_poll_politely2(struct Scsi_Host *, int, int, int, int, int, int, int);
>
> +#define NCR5380_poll_politely(instance, reg, bit, val, wait) \
> +        NCR5380_poll_politely2(instance, reg, bit, val, reg, bit, val, wait)

Thanks, that silences the warning.

BTW, what about using the static inline variant here? That works, too.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ