Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1576099ybg; Tue, 2 Jun 2020 13:53:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx+2zEoHdbviiLELkus0zmNHOif2KxnsQ8EMWko4my3yjd11/El4YD6o+cclhC/Ibyur33U X-Received: by 2002:a50:a602:: with SMTP id d2mr29553136edc.112.1591131200561; Tue, 02 Jun 2020 13:53:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591131200; cv=none; d=google.com; s=arc-20160816; b=UR3937UKEHs6iAFJ1m9nti68X+AN/EIB+14KMhA/ebmzhghdXAXPa3U4b7YOdPXFN7 70R2b6ul79QHKDWZ+IjGjLyFz9OWC6yyvd06U8fO5DkWbQbeFKBbxL4NQi9aQFBhmOXn wq3v6R67hnIhpI5ktPIkrr/7FFCz5X9b4SoVy3ikxnycNg/p/zp5DFcRwmv1wSLCleBm kAVu5T8BSOmOFJ0iqJ+zDhoRfIw5qTerK6rtp6KaMZN1DvMe4NM+d01HgfXLxEJx/2pt HB/AmkWQrF2PT9eF8sKQy60kLU3Td7S85OmCcYtJeBKxSnU+gK46m4DmHk+NXhlwtUPM 6eAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=FaeGUmAiHAM76RxB4R32eJKBQKRgBN4BxD0Aj0T02yw=; b=vY5hTWCUehgsYdrR9siBXYn5Unbdlb2x12Ed8sXhfOM2LBXkuMYGB8LYdlpnPhDKrv vfV7vmkxuVxES3CKtQJT46Q8O4vV7mO1kcJUsJuUL5aSlBVK7IcswnOgAypmZdwJbXkn PVhmgvl10k0hvkrzRG/lDKRWDn28fXv3+CEUF7PsHRQ1rtlmBPzmPIyd9C/qyl8kv2G+ 26bsS2nnpecJoOkk8Oljg49xfH8A16QBM3xF6b9ii2WLwBwIbgvRQilFDGXk3iwcFTJC 3tGMoZDlzeO/W78T7SsVtRVaZvMCIu+/WO2ynC2fDz46uZNheFYsyY4VjzjLnLlA91Df kouQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ks3si9423ejb.376.2020.06.02.13.52.56; Tue, 02 Jun 2020 13:53:20 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728170AbgFBUuk (ORCPT + 99 others); Tue, 2 Jun 2020 16:50:40 -0400 Received: from asavdk4.altibox.net ([109.247.116.15]:51324 "EHLO asavdk4.altibox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726130AbgFBUuk (ORCPT ); Tue, 2 Jun 2020 16:50:40 -0400 Received: from ravnborg.org (unknown [158.248.194.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by asavdk4.altibox.net (Postfix) with ESMTPS id 139228050E; Tue, 2 Jun 2020 22:50:34 +0200 (CEST) Date: Tue, 2 Jun 2020 22:50:33 +0200 From: Sam Ravnborg To: Bartlomiej Zolnierkiewicz Cc: Jason Yan , spock@gentoo.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] video: uvesafb: use true,false for bool variables Message-ID: <20200602205033.GA56418@ravnborg.org> References: <20200422071845.403-1-yanaijie@huawei.com> <4b460d82-b23c-f6ce-6593-735a726e4d8a@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4b460d82-b23c-f6ce-6593-735a726e4d8a@samsung.com> X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=G88y7es5 c=1 sm=1 tr=0 a=UWs3HLbX/2nnQ3s7vZ42gw==:117 a=UWs3HLbX/2nnQ3s7vZ42gw==:17 a=kj9zAlcOel0A:10 a=i0EeH86SAAAA:8 a=hD80L64hAAAA:8 a=7gkXJVJtAAAA:8 a=7mOBRU54AAAA:8 a=pQOkFE01E-EqrLGc8Q0A:9 a=CjuIK1q_8ugA:10 a=E9Po1WZjFZOl8hwRPBS3:22 a=wa9RWnbW_A1YIeRBVszw:22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Bartlomiej On Mon, Jun 01, 2020 at 12:37:00PM +0200, Bartlomiej Zolnierkiewicz wrote: > > Hi, > > On 4/22/20 9:18 AM, Jason Yan wrote: > > Fix the following coccicheck warning: > > > > drivers/video/fbdev/uvesafb.c:48:12-17: WARNING: Assignment of 0/1 to > > bool variable > > drivers/video/fbdev/uvesafb.c:1827:3-13: WARNING: Assignment of 0/1 to > > bool variable > > drivers/video/fbdev/uvesafb.c:1829:3-13: WARNING: Assignment of 0/1 to > > bool variable > > drivers/video/fbdev/uvesafb.c:1835:3-9: WARNING: Assignment of 0/1 to > > bool variable > > drivers/video/fbdev/uvesafb.c:1837:3-9: WARNING: Assignment of 0/1 to > > bool variable > > drivers/video/fbdev/uvesafb.c:1839:3-8: WARNING: Assignment of 0/1 to > > bool variable > > > > Signed-off-by: Jason Yan > > --- > > drivers/video/fbdev/uvesafb.c | 12 ++++++------ > > 1 file changed, 6 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/video/fbdev/uvesafb.c b/drivers/video/fbdev/uvesafb.c > > index 1b385cf76110..bee29aadc646 100644 > > --- a/drivers/video/fbdev/uvesafb.c > > +++ b/drivers/video/fbdev/uvesafb.c > > @@ -45,7 +45,7 @@ static const struct fb_fix_screeninfo uvesafb_fix = { > > }; > > > > static int mtrr = 3; /* enable mtrr by default */ > > -static bool blank = 1; /* enable blanking by default */ > > +static bool blank = true; /* enable blanking by default */ > > static int ypan = 1; /* 0: scroll, 1: ypan, 2: ywrap */ > > static bool pmi_setpal = true; /* use PMI for palette changes */ > > static bool nocrtc; /* ignore CRTC settings */ > > @@ -1824,19 +1824,19 @@ static int uvesafb_setup(char *options) > > else if (!strcmp(this_opt, "ywrap")) > > ypan = 2; > > else if (!strcmp(this_opt, "vgapal")) > > - pmi_setpal = 0; > > + pmi_setpal = false; > > else if (!strcmp(this_opt, "pmipal")) > > - pmi_setpal = 1; > > + pmi_setpal = true; > > else if (!strncmp(this_opt, "mtrr:", 5)) > > mtrr = simple_strtoul(this_opt+5, NULL, 0); > > else if (!strcmp(this_opt, "nomtrr")) > > mtrr = 0; > > else if (!strcmp(this_opt, "nocrtc")) > > - nocrtc = 1; > > + nocrtc = true; > > else if (!strcmp(this_opt, "noedid")) > > - noedid = 1; > > + noedid = true; > > else if (!strcmp(this_opt, "noblank")) > > - blank = 0; > > + blank = true; > > The above conversion is incorrect. > > The follow-up fix is included below (the original patch has been > already applied). Good spot, sorry for missing this when I applied the original patch. > > Best regards, > -- > Bartlomiej Zolnierkiewicz > Samsung R&D Institute Poland > Samsung Electronics > > > From: Bartlomiej Zolnierkiewicz > Subject: [PATCH] video: fbdev: uvesafb: fix "noblank" option handling > > Fix the recent regression. > > Fixes: dbc7ece12a38 ("video: uvesafb: use true,false for bool variables") > Cc: Jason Yan > Cc: Sam Ravnborg > Cc: Michal Januszewski > Signed-off-by: Bartlomiej Zolnierkiewicz Reviewed-by: Sam Ravnborg > --- > drivers/video/fbdev/uvesafb.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > Index: b/drivers/video/fbdev/uvesafb.c > =================================================================== > --- a/drivers/video/fbdev/uvesafb.c > +++ b/drivers/video/fbdev/uvesafb.c > @@ -1836,7 +1836,7 @@ static int uvesafb_setup(char *options) > else if (!strcmp(this_opt, "noedid")) > noedid = true; > else if (!strcmp(this_opt, "noblank")) > - blank = true; > + blank = false; > else if (!strncmp(this_opt, "vtotal:", 7)) > vram_total = simple_strtoul(this_opt + 7, NULL, 0); > else if (!strncmp(this_opt, "vremap:", 7))