* Re: Re: [PATCH] extcon-max8997: remove usage of ret in max8997_muic_handle_charger_type_detach
@ 2012-09-04 5:47 MyungJoo Ham
2012-09-04 18:47 ` Devendra Naga
0 siblings, 1 reply; 2+ messages in thread
From: MyungJoo Ham @ 2012-09-04 5:47 UTC (permalink / raw)
To: Devendra Naga, 최찬우, linux-kernel
[-- 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¥
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-09-04 18:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-04 5:47 Re: [PATCH] extcon-max8997: remove usage of ret in max8997_muic_handle_charger_type_detach MyungJoo Ham
2012-09-04 18:47 ` Devendra Naga
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).