public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: Arvind Yadav <arvind.yadav.cs@gmail.com>,
	nicolas.ferre@microchip.com, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2] misc: atmel-ssc: Handle return value of clk_prepare_enable and clk_prepare
Date: Mon, 5 Jun 2017 14:05:15 +0200	[thread overview]
Message-ID: <20170605120515.GB6867@kroah.com> (raw)
In-Reply-To: <20170605093652.4dpeb2ovjehfsxwl@piout.net>

On Mon, Jun 05, 2017 at 11:36:52AM +0200, Alexandre Belloni wrote:
> On 05/06/2017 at 14:53:30 +0530, Arvind Yadav wrote:
> > Hi,
> > 
> > Yes, Patch v1 was wrong that's why i have push v2.
> > clk_prepare and clk_prepare_enable can fail. There
> 
> No this is not true, they will never fail for the SSC.

How is anyone supposed to know this?  Just check the functions correctly
and move on, if they can never fail, wonderful, that's a code path that
is not going to be run.

> > is not harm to check it's return value. It'll not impact present
> > functionality.
> > 
> 
> It does impact boot time, this patch adds 112 bytes to a compressed
> kernel for no reason.

It solves the issue that if someone copy/paste from this code, they will
implement something incorrectly.  You can spare the 112 bytes (which
really, seems very large for just 2 error cases, are you sure that's
right?  Just drop the string if you care about size here.

thanks,

greg k-h

  reply	other threads:[~2017-06-05 12:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-02  5:39 [PATCH v2] misc: atmel-ssc: Handle return value of clk_prepare_enable and clk_prepare Arvind Yadav
2017-06-03  9:50 ` Greg KH
2017-06-03 22:17 ` Alexandre Belloni
2017-06-05  9:23   ` Arvind Yadav
2017-06-05  9:36     ` Alexandre Belloni
2017-06-05 12:05       ` Greg KH [this message]
2017-06-05 13:13         ` Alexandre Belloni

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=20170605120515.GB6867@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=arvind.yadav.cs@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.ferre@microchip.com \
    /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