public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christos Gkekas <chris.gekas@gmail.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Darren Hart <dvhart@infradead.org>,
	Andy Shevchenko <andy@infradead.org>,
	Platform Driver <platform-driver-x86@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] intel-oaktrail: Clean up dead code
Date: Mon, 9 Oct 2017 21:45:46 +0100	[thread overview]
Message-ID: <20171009204546.GA2839@inspiron> (raw)
In-Reply-To: <CAHp75Ve7404BFgitG=HNKP0EyZN-Uoa=JOhGvaKz1N1ERs=eXQ@mail.gmail.com>

On 09/10/17 13:21:17 +0300, Andy Shevchenko wrote:
> On Mon, Oct 9, 2017 at 1:57 AM, Christos Gkekas <chris.gekas@gmail.com> wrote:
> > A couple of macros are unused and need to be removed.
> > Also variable percent is unsigned so checking whether it is less than
> > zero is redundant.
> 
> > -#define OT_EC_CAMERA_MASK      (1 << 0)
> >  #define OT_EC_BT_MASK          (1 << 1)
> >  #define OT_EC_GPS_MASK         (1 << 2)
> >  #define OT_EC_WIFI_MASK                (1 << 3)
> >  #define OT_EC_WWAN_MASK                (1 << 4)
> > -#define OT_EC_TS_MASK          (1 << 5)
> 
> While they are unused they won't bring any additional code to the binary.
> The rationale to leave them is to have a bit descriptions in the code,
> so, anyone who is in possession of that old and rare hardware can do
> some tests or amendments without searching looking to documentation.
> 
> 
> > -       if (percent < 0 || percent > OT_EC_BL_BRIGHTNESS_MAX)
> > +       if (percent > OT_EC_BL_BRIGHTNESS_MAX)
> >                 return -EINVAL;
> 
> While it's true, doesn't compiler take care about that?
> 
> https://lkml.org/lkml/2006/11/28/206
> 
> So, unfortunately I have no reason to take it.
> 
> -- 
> With Best Regards,
> Andy Shevchenko

Fair enough, thanks for your time and feedback.

Regards,
Christos

      reply	other threads:[~2017-10-09 20:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-08 22:57 [PATCH] intel-oaktrail: Clean up dead code Christos Gkekas
2017-10-09 10:21 ` Andy Shevchenko
2017-10-09 20:45   ` Christos Gkekas [this message]

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=20171009204546.GA2839@inspiron \
    --to=chris.gekas@gmail.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=andy@infradead.org \
    --cc=dvhart@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@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