Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp476533ybg; Mon, 1 Jun 2020 06:28:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwNHSePza9MuiDLYUxYwRfE3GL2PhpvvnxBWTcuOXYj1Qcob47U6he9kaNCqYs2V5WePXPv X-Received: by 2002:a05:6402:3ca:: with SMTP id t10mr16612918edw.128.1591018117693; Mon, 01 Jun 2020 06:28:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591018117; cv=none; d=google.com; s=arc-20160816; b=j9WNy9tfvhHkSORXRfwFFRUzIMHaOOj/zvVRkQu85C+ugGCD9nuWwz+J8D3Ld5aD0k 71IZe5309VVCcelgYygC+KJ2jr0jYjZn0Kobp1uR0lH3a9PGP/51yNjsI1CzpEUWgbEu BW38nRSl44nfTupPL7oRiI4DHkRfxN41WM3he6ZlyEtUK2Ne29yGKHBVjdybeIOOT1is HG2J8nj9FM/0slh7brYvGXRK2F4eSDEBkkPdgxR7FNN+X0e3HgmiKeC/I0791w2DlSh/ tgA3RsTVBgwhisW6B29bdeu0nXeen2VVld/D6fVTXfPf/niaMhYiEIMHk5HqaO9XLAL8 T0mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type :content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:cc:to:subject:from:dkim-signature :dkim-filter; bh=7MYfA7T1V2zf0ITQLbcPCa/EsxPMtj591hArtPdOjMw=; b=t8oXLrvFho0G/L/7Yxr3XdBjcjV7q8K24jmQtkmKRT5BB0OXkeaQ9vzQT4nmk9gcy2 +cwOW8T4Ey6bCvpMz9HLDfCmIX5hQgXTQbuFw6gn2O5+clc2jc7LvI404blNg8Filtil ke2ma/bIIQifJI5rkTsi05GeNY3UAqmSwD7fwoUIgWMScesMYaItHx/3g9q7HR+KAsTa yrQyWwZ7dzVCYY/kUhSyGe9eImQehpztvrAOfbVtDYrrLdyXLXsMh1HzyRMnc4rYIhgK 1FUd3ZLwDlc0zcSypSBdcr76/iUzL6SUJGa2unwcUur6B3AiCwdEpVvBdXTWXGKL2SPR ldHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=G6EVZ06p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f1si11825723edl.533.2020.06.01.06.28.15; Mon, 01 Jun 2020 06:28:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=G6EVZ06p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727875AbgFANZi (ORCPT + 99 others); Mon, 1 Jun 2020 09:25:38 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:44779 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727808AbgFANZb (ORCPT ); Mon, 1 Jun 2020 09:25:31 -0400 Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout2.w1.samsung.com (KnoxPortal) with ESMTP id 20200601132530euoutp021a432bb622e67b51530eb3373a1635ab~UbmDTzUm61973619736euoutp02b for ; Mon, 1 Jun 2020 13:25:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20200601132530euoutp021a432bb622e67b51530eb3373a1635ab~UbmDTzUm61973619736euoutp02b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1591017930; bh=7MYfA7T1V2zf0ITQLbcPCa/EsxPMtj591hArtPdOjMw=; h=From:Subject:To:Cc:Date:In-Reply-To:References:From; b=G6EVZ06pRJJULZiV8S7AVTH/3ncNkfYaIcWhbeuLOLPrZWKG/W5wlpGKUIpMaRhjv DAorg2ctcMO5q+9C4UknJo+QbLjloH9IPsSM6T/KU6ExB5ZFwwyBqzMHDGNhM6JJiu SereMKlyB9KM9zu6Zen44NS+u1OuvrF1QVyCZ2kI= Received: from eusmges1new.samsung.com (unknown [203.254.199.242]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20200601132530eucas1p19a24e5bd23ad1d0190549ddb8bf39910~UbmDLs-Sf1285112851eucas1p1o; Mon, 1 Jun 2020 13:25:30 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges1new.samsung.com (EUCPMTA) with SMTP id AB.14.61286.AC105DE5; Mon, 1 Jun 2020 14:25:30 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p2.samsung.com (KnoxPortal) with ESMTPA id 20200601132530eucas1p273e2fc07bcc82b5acdc6329853398e59~UbmC5ESkn2293122931eucas1p2i; Mon, 1 Jun 2020 13:25:30 +0000 (GMT) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20200601132530eusmtrp2e22ef13b605eb5f0be3d4bec7968535b~UbmC4V9au1059710597eusmtrp2s; Mon, 1 Jun 2020 13:25:30 +0000 (GMT) X-AuditID: cbfec7f2-ef1ff7000001ef66-d3-5ed501caf24b Received: from eusmtip1.samsung.com ( [203.254.199.221]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id DC.95.07950.9C105DE5; Mon, 1 Jun 2020 14:25:30 +0100 (BST) Received: from [106.120.51.71] (unknown [106.120.51.71]) by eusmtip1.samsung.com (KnoxPortal) with ESMTPA id 20200601132529eusmtip144ca8a4d65015ef72f79683e359a1e3b~UbmCifbJL1117511175eusmtip1Q; Mon, 1 Jun 2020 13:25:29 +0000 (GMT) From: Bartlomiej Zolnierkiewicz Subject: Re: [trivial PATCH] video: fbdev: Use IS_BUILTIN To: Joe Perches Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Message-ID: <465a04eb-cd2e-d0da-b667-584d297a0102@samsung.com> Date: Mon, 1 Jun 2020 15:25:29 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA01Sa0hTYRjm2zmbR2l6nJovGqWjrMy0UT9WmqQUrH/1Q8ku2lFPOtqm7TjT IrI/mQs1NVCXtfCSNnQuXU4NzBSc5TVviCQGmpuSWF4ItSwPZ5L/nve5fO/7wEdgoiq+DyFX pdFqFaUQC1zwpq61/qOf0Gjssa55kXRkdVEgfTY1jUsbpsf40u68H3zpcGvZFleZj0tLBtp4 Z5xkU4+tPFlj5X3ZimEMky037L2AX3YJS6QV8nRaHRJ+3SX5Q2kRSv15MMPy/TmehTb8tMiZ APIEvLDk87TIhRCRNQhqSysQN6wgyH2vdSjLCD4PTThtR+pHe504oRpBV8E3nBsWEGTn2DDW JSBPQUG2AbHYgzwJje3mLRNBeJL+MGl2Y/0YaUVgLawUsB4hGQ761qeI9eDkfuh+48bSXuQl WPrayecs7vCxdAZnsTN5Hppzh3ksxkhvmJjRO/A+sCyUYez7QBqdoD2rF3FXn4WKmgIBhz1g 3mp2tNkDf1v0PEcAwZ9HdkfagqC6aNORCIUv/esC9jqMPAz1rSEcHQG9g3M8lgbSFcYX3Lkj XKGwqRjjaCE8eiji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XJ24J2b5/+1PRontf/lSI5 7peD39QvmcS2NkLLXWXC1BU6WxkfpFf3zX7pHlKsr3K/XcHqcuyjyG/Xp9xdelAj/XKmRBPr NWUhHp3ykLMXImVvzj3EK1/nMbcuY3NFLW8c2+5tPrsrhdJPnOiIPjRDZ7v5mlolluKMREMt 5qLiRABw3u1dxwIAAA== X-CMS-MailID: 20200601132530eucas1p273e2fc07bcc82b5acdc6329853398e59 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20200504232908eucas1p296927bc7c736ad924cefaea9a546459d X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20200504232908eucas1p296927bc7c736ad924cefaea9a546459d References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/5/20 1:29 AM, Joe Perches wrote: > IS_BUILTIN can be use to replace various initializations > like #if CONFIG_ int val = 1; #else int val = 0; #endif > so do so. > > Signed-off-by: Joe Perches Applied to drm-misc-next tree (patch should show up in v5.9), thanks. Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics > --- > drivers/video/fbdev/aty/aty128fb.c | 6 +----- > drivers/video/fbdev/aty/atyfb_base.c | 7 +------ > drivers/video/fbdev/aty/radeon_base.c | 6 +----- > drivers/video/fbdev/nvidia/nvidia.c | 6 +----- > drivers/video/fbdev/omap/omapfb_main.c | 6 +----- > drivers/video/fbdev/riva/fbdev.c | 6 +----- > drivers/video/fbdev/s3c2410fb.c | 6 +----- > 7 files changed, 7 insertions(+), 36 deletions(-) > > diff --git a/drivers/video/fbdev/aty/aty128fb.c b/drivers/video/fbdev/aty/aty128fb.c > index d05d4195acad..6fae6ad6cb77 100644 > --- a/drivers/video/fbdev/aty/aty128fb.c > +++ b/drivers/video/fbdev/aty/aty128fb.c > @@ -384,11 +384,7 @@ static int default_lcd_on = 1; > static bool mtrr = true; > > #ifdef CONFIG_FB_ATY128_BACKLIGHT > -#ifdef CONFIG_PMAC_BACKLIGHT > -static int backlight = 1; > -#else > -static int backlight = 0; > -#endif > +static int backlight = IS_BUILTIN(CONFIG_PMAC_BACKLIGHT); > #endif > > /* PLL constants */ > diff --git a/drivers/video/fbdev/aty/atyfb_base.c b/drivers/video/fbdev/aty/atyfb_base.c > index 49d192869cf5..23a29d61c2a2 100644 > --- a/drivers/video/fbdev/aty/atyfb_base.c > +++ b/drivers/video/fbdev/aty/atyfb_base.c > @@ -317,12 +317,7 @@ static int mclk; > static int xclk; > static int comp_sync = -1; > static char *mode; > - > -#ifdef CONFIG_PMAC_BACKLIGHT > -static int backlight = 1; > -#else > -static int backlight = 0; > -#endif > +static int backlight = IS_BUILTIN(CONFIG_PMAC_BACKLIGHT); > > #ifdef CONFIG_PPC > static int default_vmode = VMODE_CHOOSE; > diff --git a/drivers/video/fbdev/aty/radeon_base.c b/drivers/video/fbdev/aty/radeon_base.c > index e116a3f9ad56..3fe509cb9b87 100644 > --- a/drivers/video/fbdev/aty/radeon_base.c > +++ b/drivers/video/fbdev/aty/radeon_base.c > @@ -269,11 +269,7 @@ static bool force_measure_pll = 0; > static bool nomtrr = 0; > static bool force_sleep; > static bool ignore_devlist; > -#ifdef CONFIG_PMAC_BACKLIGHT > -static int backlight = 1; > -#else > -static int backlight = 0; > -#endif > +static int backlight = IS_BUILTIN(CONFIG_PMAC_BACKLIGHT); > > /* Note about this function: we have some rare cases where we must not schedule, > * this typically happen with our special "wake up early" hook which allows us to > diff --git a/drivers/video/fbdev/nvidia/nvidia.c b/drivers/video/fbdev/nvidia/nvidia.c > index c24de9107958..c6820e21875d 100644 > --- a/drivers/video/fbdev/nvidia/nvidia.c > +++ b/drivers/video/fbdev/nvidia/nvidia.c > @@ -74,11 +74,7 @@ static int vram = 0; > static int bpp = 8; > static int reverse_i2c; > static bool nomtrr = false; > -#ifdef CONFIG_PMAC_BACKLIGHT > -static int backlight = 1; > -#else > -static int backlight = 0; > -#endif > +static int backlight = IS_BUILTIN(CONFIG_PMAC_BACKLIGHT); > > static char *mode_option = NULL; > > diff --git a/drivers/video/fbdev/omap/omapfb_main.c b/drivers/video/fbdev/omap/omapfb_main.c > index 1a9d6242916e..0cbcc74fa943 100644 > --- a/drivers/video/fbdev/omap/omapfb_main.c > +++ b/drivers/video/fbdev/omap/omapfb_main.c > @@ -34,11 +34,7 @@ static unsigned long def_vyres; > static unsigned int def_rotate; > static unsigned int def_mirror; > > -#ifdef CONFIG_FB_OMAP_MANUAL_UPDATE > -static bool manual_update = 1; > -#else > -static bool manual_update; > -#endif > +static bool manual_update = IS_BUILTIN(CONFIG_FB_OMAP_MANUAL_UPDATE); > > static struct platform_device *fbdev_pdev; > static struct lcd_panel *fbdev_panel; > diff --git a/drivers/video/fbdev/riva/fbdev.c b/drivers/video/fbdev/riva/fbdev.c > index 764ec3285e62..9b3493846f4d 100644 > --- a/drivers/video/fbdev/riva/fbdev.c > +++ b/drivers/video/fbdev/riva/fbdev.c > @@ -202,11 +202,7 @@ static int flatpanel = -1; /* Autodetect later */ > static int forceCRTC = -1; > static bool noaccel = 0; > static bool nomtrr = 0; > -#ifdef CONFIG_PMAC_BACKLIGHT > -static int backlight = 1; > -#else > -static int backlight = 0; > -#endif > +static int backlight = IS_BUILTIN(CONFIG_PMAC_BACKLIGHT); > > static char *mode_option = NULL; > static bool strictmode = 0; > diff --git a/drivers/video/fbdev/s3c2410fb.c b/drivers/video/fbdev/s3c2410fb.c > index 2fb15a540167..6f8fa501583f 100644 > --- a/drivers/video/fbdev/s3c2410fb.c > +++ b/drivers/video/fbdev/s3c2410fb.c > @@ -44,11 +44,7 @@ > #include "s3c2410fb.h" > > /* Debugging stuff */ > -#ifdef CONFIG_FB_S3C2410_DEBUG > -static int debug = 1; > -#else > -static int debug; > -#endif > +static int debug = IS_BUILTIN(CONFIG_FB_S3C2410_DEBUG); > > #define dprintk(msg...) \ > do { \ >