Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1657539

Re: [PATCH v2] misc: atmel-ssc: Handle return value of clk_prepare_enable and clk_prepare

From Greg KH <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject Re: [PATCH v2] misc: atmel-ssc: Handle return value of clk_prepare_enable and clk_prepare
Date 2017-06-05 14:10 +0200
Message-ID <tOYZz-2JP-7@gated-at.bofh.it> (permalink)
References <tNNtw-4Pq-5@gated-at.bofh.it> <tOpyN-4jB-5@gated-at.bofh.it> <tOWuK-160-21@gated-at.bofh.it> <tOWEq-193-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2] misc: atmel-ssc: Handle return value of clk_prepare_enable and clk_prepare Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-06-02 07:40 +0200
  Re: [PATCH v2] misc: atmel-ssc: Handle return value of  clk_prepare_enable and clk_prepare Greg KH <gregkh@linuxfoundation.org> - 2017-06-03 16:20 +0200
  Re: [PATCH v2] misc: atmel-ssc: Handle return value of  clk_prepare_enable and clk_prepare Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-06-04 00:20 +0200
    Re: [PATCH v2] misc: atmel-ssc: Handle return value of  clk_prepare_enable and clk_prepare Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-06-05 11:30 +0200
      Re: [PATCH v2] misc: atmel-ssc: Handle return value of  clk_prepare_enable and clk_prepare Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-06-05 11:40 +0200
        Re: [PATCH v2] misc: atmel-ssc: Handle return value of  clk_prepare_enable and clk_prepare Greg KH <gregkh@linuxfoundation.org> - 2017-06-05 14:10 +0200
          Re: [PATCH v2] misc: atmel-ssc: Handle return value of  clk_prepare_enable and clk_prepare Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2017-06-05 15:20 +0200

csiph-web