Linux IIO development
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Gwendal Grignou <gwendal@chromium.org>
Cc: Justin Stitt <justinstitt@google.com>,
	Stephen Boyd <swboyd@chromium.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-hardening@vger.kernel.org
Subject: Re: [PATCH v2] iio: sx9324: avoid copying property strings
Date: Sun, 17 Dec 2023 13:00:33 +0000	[thread overview]
Message-ID: <20231217130033.0b3a5ac6@jic23-huawei> (raw)
In-Reply-To: <CAPUE2ut0gbSyzUQ+m=760kXeOqKoi+9OwaExXTSgg8S=bWhUvg@mail.gmail.com>

On Tue, 12 Dec 2023 15:51:04 -0800
Gwendal Grignou <gwendal@chromium.org> wrote:

> Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Hi Gwendal

I'll ignore this tag given the email you've replied to says there is a different
implementation. Please take a look at that version instead.

Jonathan

> 
> On Mon, Dec 11, 2023 at 4:46 PM Justin Stitt <justinstitt@google.com> wrote:
> >
> > Hi,
> >
> > On Mon, Oct 30, 2023 at 2:44 PM Stephen Boyd <swboyd@chromium.org> wrote:  
> > >
> > >
> > > We need to free it in other places too, like if the count doesn't match.
> > > It may be easier to extract this section and just have 4 string
> > > literals.
> > >
> > >         switch (reg_def->reg) {
> > >         case SX9324_REG_AFE_PH0:
> > >                 reg_def = sx9324_parse_phase_prop(dev, reg_def, "semtech,ph0-pin");
> > >                 break;
> > >         case SX9324_REG_AFE_PH1:
> > >                 reg_def = sx9324_parse_phase_prop(dev, reg_def, "semtech,ph1-pin");
> > >                 break;
> > >         case SX9324_REG_AFE_PH2:
> > >                 reg_def = sx9324_parse_phase_prop(dev, reg_def, "semtech,ph2-pin");
> > >                 break;
> > >         case SX9324_REG_AFE_PH3:
> > >                 reg_def = sx9324_parse_phase_prop(dev, reg_def, "semtech,ph3-pin");
> > >                 break;
> > >  
> >
> > I've submitted v3 of this patch [1] trying out Stephen's idea. I'd
> > appreciate feedback.
> >
> > [1]: https://lore.kernel.org/all/20231212-strncpy-drivers-iio-proximity-sx9324-c-v3-1-b8ae12fc8a5d@google.com/
> >
> > Thanks
> > Justin  


      reply	other threads:[~2023-12-17 13:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-26 23:53 [PATCH v2] iio: sx9324: avoid copying property strings Justin Stitt
2023-10-28 15:26 ` Jonathan Cameron
2023-10-30 21:44   ` Stephen Boyd
2023-12-12  0:46     ` Justin Stitt
2023-12-12 23:51       ` Gwendal Grignou
2023-12-17 13:00         ` Jonathan Cameron [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231217130033.0b3a5ac6@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=gwendal@chromium.org \
    --cc=justinstitt@google.com \
    --cc=lars@metafoo.de \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=swboyd@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox