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-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdXEy6Z4=2off-Y74R6GgKAPnYWwKFTji7ebPE74fddRkA@mail.gmail.com>
Date:	Wed, 10 Dec 2014 11:16:47 +0100
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Hannes Reinecke <hare@...e.de>, Christoph Hellwig <hch@....de>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	scsi <linux-scsi@...r.kernel.org>
Subject: Re: esp_scsi: make number of tags configurable

On Tue, Dec 9, 2014 at 6:36 AM, Linux Kernel Mailing List
<linux-kernel@...r.kernel.org> wrote:
> Gitweb:     http://git.kernel.org/linus/;a=commit;h=3707a186c8970e3c4f3c8d9ccf4230b8657e919f
> Commit:     3707a186c8970e3c4f3c8d9ccf4230b8657e919f
> Parent:     a87bf29362c763cf35faa17154b699471a8b902e
> Refname:    refs/heads/master
> Author:     Hannes Reinecke <hare@...e.de>
> AuthorDate: Mon Nov 24 15:37:20 2014 +0100
> Committer:  Christoph Hellwig <hch@....de>
> CommitDate: Mon Nov 24 16:10:23 2014 +0100
>
>     esp_scsi: make number of tags configurable
>
>     Add a field 'num_tags' to the esp structure to allow drivers
>     to overwrite the number of avialable tags if required.
>     Default is ESP_DEFAULT_TAGS.
>
>     Reviewed-by: Paolo Bonzini <pbonzini@...hat.com>
>     Acked-by: David S. Miller <davem@...emloft.net>
>     Signed-off-by: Hannes Reinecke <hare@...e.de>
>     Signed-off-by: Christoph Hellwig <hch@....de>
> ---
>  drivers/scsi/esp_scsi.c | 12 ++++++------
>  drivers/scsi/esp_scsi.h |  3 +--
>  2 files changed, 7 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/scsi/esp_scsi.c b/drivers/scsi/esp_scsi.c
> index 7e7687f..57ccb14 100644
> --- a/drivers/scsi/esp_scsi.c
> +++ b/drivers/scsi/esp_scsi.c
> @@ -2317,6 +2317,10 @@ int scsi_esp_register(struct esp *esp, struct device *dev)
>         static int instance;
>         int err;
>
> +       if (!esp->num_tags)
> +               esp->num_tags = ESP_DEFAULT_TAGS;
> +       else if (esp->num_tags >= ESP_MAX_TAG)

drivers/scsi/esp_scsi.c: In function ‘scsi_esp_register’:
drivers/scsi/esp_scsi.c:2399: warning: comparison is always false due
to limited range of data type

ESP_MAX_TAG is 256, num_tags is u8.

> +               esp->num_tags = ESP_MAX_TAG - 1;

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ