From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754861AbdJIUpw (ORCPT ); Mon, 9 Oct 2017 16:45:52 -0400 Received: from mail-wm0-f54.google.com ([74.125.82.54]:50281 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754268AbdJIUpt (ORCPT ); Mon, 9 Oct 2017 16:45:49 -0400 X-Google-Smtp-Source: AOwi7QDLP8aLGdk9kacQCC7rxHLJXKgxv452fwf5i+lozapeOGJtV0M8NnB7PD615vM3jpCKwS18oA== Date: Mon, 9 Oct 2017 21:45:46 +0100 From: Christos Gkekas To: Andy Shevchenko Cc: Darren Hart , Andy Shevchenko , Platform Driver , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] intel-oaktrail: Clean up dead code Message-ID: <20171009204546.GA2839@inspiron> References: <1507503469-22507-1-git-send-email-chris.gekas@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/10/17 13:21:17 +0300, Andy Shevchenko wrote: > On Mon, Oct 9, 2017 at 1:57 AM, Christos Gkekas 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