From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C3435C43460 for ; Mon, 12 Apr 2021 11:00:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A093261074 for ; Mon, 12 Apr 2021 11:00:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239920AbhDLLAw (ORCPT ); Mon, 12 Apr 2021 07:00:52 -0400 Received: from mga04.intel.com ([192.55.52.120]:33680 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239890AbhDLLAm (ORCPT ); Mon, 12 Apr 2021 07:00:42 -0400 IronPort-SDR: mueUXr1tte38fCGcx6Oc02xQvnvFNeLxNPpQHR/EYbiLgNly7xOCypLHeMpW37enI4A41H7/k1 /T/MBrQTTQLw== X-IronPort-AV: E=McAfee;i="6000,8403,9951"; a="192031795" X-IronPort-AV: E=Sophos;i="5.82,216,1613462400"; d="scan'208";a="192031795" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2021 04:00:23 -0700 IronPort-SDR: +S8E8BV1Dc2BzlBF8/6WPnhbTKYz9r1ME7efkhsT8jHc1YwtQorbKlYV2MeEezTE1fmx7imL74 OF5Ro7iqytCA== X-IronPort-AV: E=Sophos;i="5.82,216,1613462400"; d="scan'208";a="599933660" Received: from paasikivi.fi.intel.com ([10.237.72.42]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2021 04:00:19 -0700 Received: from paasikivi.fi.intel.com (localhost [127.0.0.1]) by paasikivi.fi.intel.com (Postfix) with SMTP id 6EF60203D0; Mon, 12 Apr 2021 14:00:17 +0300 (EEST) Date: Mon, 12 Apr 2021 14:00:17 +0300 From: Sakari Ailus To: Greg KH Cc: Mitali Borkar , bingbu.cao@intel.com, tian.shu.qiu@intel.com, mchehab@kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, outreachy-kernel@googlegroups.com, mitali_s@me.iitr.ac.in, laurent.pinchart@ideasonboard.com Subject: Re: [PATCH 1/6] staging: media: intel-ipu3: replace bit shifts with BIT() macro Message-ID: <20210412110017.GM3@paasikivi.fi.intel.com> References: <20210412094230.GI3@paasikivi.fi.intel.com> <20210412104435.GL3@paasikivi.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 12, 2021 at 12:55:52PM +0200, Greg KH wrote: > On Mon, Apr 12, 2021 at 01:44:35PM +0300, Sakari Ailus wrote: > > Hi Greg, > > > > On Mon, Apr 12, 2021 at 11:49:43AM +0200, Greg KH wrote: > > > On Mon, Apr 12, 2021 at 12:42:30PM +0300, Sakari Ailus wrote: > > > > Hi Mitali, > > > > > > > > On Mon, Apr 12, 2021 at 04:38:39AM +0530, Mitali Borkar wrote: > > > > > Added #include and replaced bit shifts by BIT() macro. > > > > > This BIT() macro from linux/bitops.h is used to define IPU3_UAPI_GRID_Y_START_EN > > > > > and IPU3_UAPI_AWB_RGBS_THR_B_* bitmask. > > > > > Use of macro is better and neater. It maintains consistency. > > > > > Reported by checkpatch. > > > > > > > > > > Signed-off-by: Mitali Borkar > > > > > --- > > > > > drivers/staging/media/ipu3/include/intel-ipu3.h | 7 ++++--- > > > > > 1 file changed, 4 insertions(+), 3 deletions(-) > > > > > > > > > > diff --git a/drivers/staging/media/ipu3/include/intel-ipu3.h b/drivers/staging/media/ipu3/include/intel-ipu3.h > > > > > index edd8edda0647..589d5ccee3a7 100644 > > > > > --- a/drivers/staging/media/ipu3/include/intel-ipu3.h > > > > > +++ b/drivers/staging/media/ipu3/include/intel-ipu3.h > > > > > @@ -5,6 +5,7 @@ > > > > > #define __IPU3_UAPI_H > > > > > > > > > > #include > > > > > +#include > > > > > > > > > > /* from /drivers/staging/media/ipu3/include/videodev2.h */ > > > > > > > > > > @@ -22,11 +23,11 @@ > > > > > #define IPU3_UAPI_MAX_BUBBLE_SIZE 10 > > > > > > > > > > #define IPU3_UAPI_GRID_START_MASK ((1 << 12) - 1) > > > > > -#define IPU3_UAPI_GRID_Y_START_EN (1 << 15) > > > > > +#define IPU3_UAPI_GRID_Y_START_EN BIT(15) > > > > > > > > This header is used in user space where you don't have the BIT() macro. > > > > > > If that is true, why is it not in a "uapi" subdir within this driver? > > > > > > Otherwise it is not obvious at all that this is the case :( > > > > It defines an interface towards the user space and the argument has been a > > staging driver shouldn't be doing that (for the lack of ABI stability), > > hence leaving it where it is currently. > > I think we are talking past each other here... > > If you have a userspace api, then put that in a .h file that has a > "uapi" in the path. Just because you have this in a staging driver does > not mean you should not have such a thing, otherwise you are going to > constantly fight against people sending you patches like this as there > is no obvious way to determine this. > > So how about moving this file to: > drivers/staging/media/ipu3/include/uapi/intel-ipu3.h Ah, sure! I'll send a patch. -- Sakari Ailus