public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: MyungJoo Ham <myungjoo.ham@samsung.com>
To: "Devendra Naga" <develkernel412222@gmail.com>,
	최찬우 <cw00.choi@samsung.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Re: [PATCH] extcon-max8997: remove usage of ret in max8997_muic_handle_charger_type_detach
Date: Tue, 04 Sep 2012 05:47:31 +0000 (GMT)	[thread overview]
Message-ID: <28012960.171051346737650663.JavaMail.weblogic@epml19> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=euc-kr, Size: 1926 bytes --]

> any comments ?
> 

Sorry for replying late.

It has been applied to the extcon-for-next tree at
http://git.infradead.org/users/kmpark/linux-samsung/shortlog/refs/heads/extcon-for-next
, which will appear in hours.


> On Wed, Aug 15, 2012 at 12:19 PM, Devendra Naga
> <develkernel412222@gmail.com> wrote:
> > actually we can do returns with error or success with out ret in this function,
> > so remove the ret variable, and reduce a very little (4byte) space on stack of this function
> >
> > Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
> > ---
> >  compile tested.
> >
> >  drivers/extcon/extcon-max8997.c | 6 ++----
> >  1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/extcon/extcon-max8997.c b/drivers/extcon/extcon-max8997.c
> > index ef9090a..77b66b0 100644
> > --- a/drivers/extcon/extcon-max8997.c
> > +++ b/drivers/extcon/extcon-max8997.c
> > @@ -271,8 +271,6 @@ out:
> >  static int max8997_muic_handle_charger_type_detach(
> >                                 struct max8997_muic_info *info)
> >  {
> > -       int ret = 0;
> > -
> >         switch (info->pre_charger_type) {
> >         case MAX8997_CHARGER_TYPE_USB:
> >                 extcon_set_cable_state(info->edev, "USB", false);
> > @@ -290,11 +288,11 @@ static int max8997_muic_handle_charger_type_detach(
> >                 extcon_set_cable_state(info->edev, "Fast-charger", false);
> >                 break;
> >         default:
> > -               ret = -EINVAL;
> > +               return -EINVAL;
> >                 break;
> >         }
> >
> > -       return ret;
> > +       return 0;
> >  }
> >
> >  static int max8997_muic_handle_charger_type(struct max8997_muic_info *info,
> > --
> > 1.7.12.rc2
> >
> 
> 
> 
>        
>   
>          
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

             reply	other threads:[~2012-09-04  5:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-04  5:47 MyungJoo Ham [this message]
2012-09-04 18:47 ` Re: [PATCH] extcon-max8997: remove usage of ret in max8997_muic_handle_charger_type_detach Devendra Naga

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=28012960.171051346737650663.JavaMail.weblogic@epml19 \
    --to=myungjoo.ham@samsung.com \
    --cc=cw00.choi@samsung.com \
    --cc=develkernel412222@gmail.com \
    --cc=linux-kernel@vger.kernel.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