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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMuHMdWHSigAGx6EtFp_Em8Qw-jt2E-o79ORoTWe=MdwZmF5pw@mail.gmail.com>
Date:	Fri, 24 Jan 2014 09:33:49 +0100
From:	Geert Uytterhoeven <geert@...ux-m68k.org>
To:	Kuninori Morimoto <kuninori.morimoto.gx@...il.com>
Cc:	Vinod Koul <vinod.koul@...el.com>,
	Morimoto <kuninori.morimoto.gx@...esas.com>,
	Linux-SH <linux-sh@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] shdma: add R-Car Audio DMAC peri peri driver

Hi Morimoto-san,

On Fri, Jan 24, 2014 at 9:18 AM, Kuninori Morimoto
<kuninori.morimoto.gx@...il.com> wrote:
>> > +       if (slave_id >= AUDMAPP_SLAVE_NUMBER)
>>
>> So slave_id should be unsigned int, too, and AUDMAPP_SLAVE_NUMBER
>> too ("29U").
>
> Hmm...
> This driver is called from shdma-base.c.
> And shdmac.c/sudmac.c/rcar-hpbdmac.c are same style.
>
>  1) this "slave_id" came from shdma_ops::set_slave
>     and, it is using "int"
>  2) above drivers have same xxx_find_slave(),
>     they are using "int".
>     (this driver is based on that)
>
> What should I do ?

OK, then you should keep using int, and change the test to:

    if (slave_id < 0 || slave_id >= AUDMAPP_SLAVE_NUMBER)

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