Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp415176ybz; Wed, 22 Apr 2020 00:23:20 -0700 (PDT) X-Google-Smtp-Source: APiQypIdfeg2kCNgguRGF00adQWZnSiSyPIDD6mjIDFTfH5dOTb61o2N9FKNM6N9QMypbm862c3X X-Received: by 2002:a17:907:2142:: with SMTP id rk2mr25349378ejb.356.1587540200067; Wed, 22 Apr 2020 00:23:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587540200; cv=none; d=google.com; s=arc-20160816; b=M19FvNa0NdzflWTCEjS8twfnzsU8P9Wg2oO6JVSxx2jNiHwoeCQTc6ukwmq5/AVpMY CpsjRREAx9jQSfz8uyp5GdpGIS4cp9rMnFKY9sAFVkwmb5eUjZLRfx8bdf54/BJKyF/z qnwS4E9c1pY4B1ee46IlMSgr8dERzAZPQ6Af3Ct44+0LuwqXKOcX/bA/NlRAtHr07FB7 m42rcLQVylRHfcGhflArGwPrvoz7SEhUqUlWy1cjXq/hGRMLCQPBzpBGW0bHYnuHoTVw +qqJBK3xfm/bg/N2IDIEDtgwhlw+jTl2+I7Y6cNgydoI4XZkZF4hk38FbtamZ6rHQ8WQ PPxw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Ovah3HdFtUWCOlGws4j+XqLQyBGnJj9T/59GUj8Hwgs=; b=qmBRwk4xXHXIWRBXpXpAmkTkpB5SuhfISbD3mq2zfI38JCYKXUrj/Gnx4bXN4RSeOg TT7Witj4+eAvC6ebADcj+C84V1QUpwYGMbleqfrdgdwJCd980rY2CgKlrt/cu/6P0+M+ KrdptVE2/VP6MFYLkGFufLEcgUqM/F1C7x483u612+Jfwdg8fkn0Um3aRVI2ZI/l4nwt ZUudmN21ly8Ddb6ZFmTTLKlCgXUTnLRXlTosTnJIN7wSNuv41FOdwCaUK/o1kPDz7cjQ rS9+5bd7fdiSSYcvmw0n3rS/UetceaYPKPygfVKVmD06NsyAWoSxefRPBbAF529U89rL jgpA== 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 c4si3089285ejm.465.2020.04.22.00.22.57; Wed, 22 Apr 2020 00:23: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 S1726508AbgDVHTa (ORCPT + 99 others); Wed, 22 Apr 2020 03:19:30 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:2871 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726499AbgDVHT3 (ORCPT ); Wed, 22 Apr 2020 03:19:29 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 962E14C4598441586B28; Wed, 22 Apr 2020 15:19:25 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.487.0; Wed, 22 Apr 2020 15:19:16 +0800 From: Jason Yan To: , , , , CC: Jason Yan Subject: [PATCH] video: uvesafb: use true,false for bool variables Date: Wed, 22 Apr 2020 15:18:45 +0800 Message-ID: <20200422071845.403-1-yanaijie@huawei.com> X-Mailer: git-send-email 2.21.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; else if (!strncmp(this_opt, "vtotal:", 7)) vram_total = simple_strtoul(this_opt + 7, NULL, 0); else if (!strncmp(this_opt, "vremap:", 7)) -- 2.21.1