linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Jassi Brar <jassisinghbrar@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] firmware: arm_scmi: Make scmi core independent of transport type
Date: Fri, 10 Jan 2020 12:22:26 +0000	[thread overview]
Message-ID: <20200110122226.GA45077@bogus> (raw)
In-Reply-To: <20200109091613.fx2ggmmjvgjempks@vireshk-i7>

On Thu, Jan 09, 2020 at 02:46:13PM +0530, Viresh Kumar wrote:
> On 09-01-20, 09:18, Arnd Bergmann wrote:
> > > +static int mailbox_chan_free(int id, void *p, void *data)
> > > +{
> > > +       struct scmi_chan_info *cinfo = p;
> > > +       struct scmi_mailbox *smbox = cinfo->transport_info;
> > > +
> > > +       if (!IS_ERR_OR_NULL(smbox->chan)) {
> > > +               mbox_free_channel(smbox->chan);
> > > +               cinfo->transport_info = NULL;
> > > +               smbox->chan = NULL;
> > > +               smbox->cinfo = NULL;
> > > +       }
> >
> > There is something wrong if smbox->chan can be be one of
> > three things (a valid pointer, a NULL pointer, or an error value).
> >
> > I see this is a preexisting problem, but please add a patch to
> > make it consistently use either NULL pointers or error codes
> > and remove all instances of IS_ERR_OR_NULL() from this
> > subsystem.
>
> This isn't a subsystem problem actually. mbox_request_channel() never
> returns NULL on error.
>
> @Sudeep, do we really need the IS_ERR_OR_NULL() check in
> scmi_mbox_free_channel() helper ? Or can it just be IS_ERR() ?
>

It can be just IS_ERR, just not noticed it so far I believe.

--
Regards,
Sudeep

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-01-10 12:22 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-29  9:31 [PATCH] firmware: arm_scmi: Make scmi core independent of transport type Viresh Kumar
2019-12-03 12:00 ` Sudeep Holla
2019-12-10 10:18   ` Viresh Kumar
2019-12-09 18:13 ` Cristian Marussi
2019-12-10  5:34   ` Viresh Kumar
2019-12-10 18:46     ` Sudeep Holla
2019-12-11  2:43       ` Viresh Kumar
2019-12-31  2:50 ` Peng Fan
2019-12-31 12:22   ` Sudeep Holla
2019-12-31 20:09 ` Jassi Brar
2020-01-06 11:00   ` Sudeep Holla
2020-01-09  8:18 ` Arnd Bergmann
2020-01-09  9:16   ` Viresh Kumar
2020-01-10 12:22     ` Sudeep Holla [this message]
2020-01-09  9:34   ` Viresh Kumar
2020-01-09 10:15     ` Arnd Bergmann
2020-01-10 12:27     ` Sudeep Holla
2020-01-13  6:45       ` Peng Fan
2020-01-10 12:31     ` Sudeep Holla

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=20200110122226.GA45077@bogus \
    --to=sudeep.holla@arm.com \
    --cc=arnd@arndb.de \
    --cc=jassisinghbrar@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viresh.kumar@linaro.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;
as well as URLs for NNTP newsgroup(s).