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]
Message-ID: <1545709234.17628.1.camel@mhfsdcap03>
Date:   Tue, 25 Dec 2018 11:40:34 +0800
From:   Chuanjia Liu <Chuanjia.Liu@...iatek.com>
To:     Sean Wang <sean.wang@...nel.org>
CC:     Linus Walleij <linus.walleij@...aro.org>,
        Matthias Brugger <matthias.bgg@...il.com>,
        "linux-mediatek@...ts.infradead.org" 
        <linux-mediatek@...ts.infradead.org>,
        "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Zhiyong Tao (陶志勇)" 
        <Zhiyong.Tao@...iatek.com>,
        "Eddie Huang (黃智傑)" 
        <eddie.huang@...iatek.com>,
        "Hailong Fan (范海龙)" 
        <Hailong.Fan@...iatek.com>,
        "Youlin Pei (裴友林)" 
        <youlin.pei@...iatek.com>
Subject: Re: [PATCH v2] pinctrl:mediatek:add judgment conditions

On Sun, 2018-12-23 at 02:50 +0800, Sean Wang wrote:
> On Mon, Dec 17, 2018 at 6:32 PM <chuanjia.liu@...iatek.com> wrote:
> >
> 
> I thought the subject still is much general, it should be further
> improved with something like "add EINT support to virtual GPIOs" and
> should say more about what virtual GPIOs means by MTKers in the patch
> description because "virtual" is a usual term used throughout the
> kernel and that would easily cause others to fail to interpret
> correctly.
> 
Thank you for your advice,I will modify subject and description.
> > From: Chuanjia Liu <Chuanjia.Liu@...iatek.com>
> >
> > This patch avoid return err when virtual gpio set SMT.
> >
> > Signed-off-by: Chuanjia Liu <Chuanjia.Liu@...iatek.com>
> > ---
> > change note:
> > v2 : 1. delete virtual gpio number
> >      2. add judgment conditions
> > ---
> >  drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c | 6 +++++-
> >  1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
> > index 4a9e0d4c2bbc..a576e417744a 100644
> > --- a/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
> > +++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c
> > @@ -290,7 +290,11 @@ static int mtk_xt_set_gpio_as_eint(void *data, unsigned long eint_n)
> >                 return err;
> >
> >         err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_SMT, MTK_ENABLE);
> > -       if (err)
> > +
> > +       /* SMT doesn't support virtual GPIO, add err != -ENOTSUPP is used for
> > +        * avoid return err when virtual gpio set SMT.
> > +        */
> 
> I'd prefer to the comments as the below
> 
> /*
> SMT is supposed to be supported by every real GPIO and doesn't support
> virtual GPIOs, so the extra condition err != -ENOTSUPP is just for
> adding EINT support to these virtual GPIOs. It should add an extra
> flag in the pin descriptor when more pins with distinctive
> characteristic come out.
> */
> 
Thank you for your advice,I will modify comments.
> > +       if (err && err != -ENOTSUPP)
> >                 return err;
> >
> >         return 0;
> > --
> > 2.19.1
> >


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ