Received: by 10.223.176.5 with SMTP id f5csp180020wra; Tue, 30 Jan 2018 09:49:20 -0800 (PST) X-Google-Smtp-Source: AH8x224N0wq3OC+6H3OY0PPzhfVgxUrlG2OSyaQp9g7I5Xfq+d+zOyB0OwfQIjYx0LQwZcDZ7FLx X-Received: by 2002:a17:902:8c86:: with SMTP id t6-v6mr26400503plo.400.1517334560572; Tue, 30 Jan 2018 09:49:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517334560; cv=none; d=google.com; s=arc-20160816; b=vYEG9oNdrTk+d4AzNw10YLLybWpSkXjwzRUGV+pR5TtiV9jRp+V7u4lFuYZFX5K4j6 r8hRzAe8MwXmdyPEwuMnIJuQD18arlHcz3ViJMvwO8XESL/DP1grkeQH4NdOGsC3tD4k M18RKMEnjo8RnTOttX/6URBr9WpDcbXp7hTIqQXhXQZdpESaW90YIat7NkAjLw6cN9lH EVCnoQDaPNq/6xLdtDKNtpPIOhGQ34Xyh3l5Ck3dPHIiAD5eDv8M9LODUi10TrFYy8vZ BlRSdC31TzuHFP1TeQ0AUfWZvI0JIQZcXQ3XHomPq8cw8utHiagZZlcNCy4ReTT4uk5O eoSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=ZzdIJVb69pYm9Q1EtQIXLC8kqp6f9mBVZIN5YJua/0A=; b=SfxKVlOh7mKfNRE4rd6RmwM1xnhmFQPLHEkMpGIDnVVtICMz+aLB1q9yO50YmTjj35 aH7+twUFGtxfNRblmk2e8Pk1Wyw+TWe9XKLJp7+KgG8SfYn7kVwAdWAe5QVKMZi9wlju EqXkgvBtcRl0rDHFTp0kmApO6XbqBFk1kC2MEaAroPlzRb5Ey/qpNO/SRyJGf8BbzEHy TbIBEs9s+cM0Sfr7DHUM7+etY/h8+IK+CsmfGnAcDp3hcEndYkMatKWn+a9MVNM1LIUV uYnGN11TylT5ooxyjcoR5xrzic8YHj2mIfCa7dcj4sz4f5d8Gs+S/1Qhk4vlmFZ5Dkqy Y5aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=W3omdGlp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a5-v6si252716plp.416.2018.01.30.09.49.04; Tue, 30 Jan 2018 09:49:20 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=W3omdGlp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753259AbeA3QCr (ORCPT + 99 others); Tue, 30 Jan 2018 11:02:47 -0500 Received: from mail-yw0-f196.google.com ([209.85.161.196]:40102 "EHLO mail-yw0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751452AbeA3QCq (ORCPT ); Tue, 30 Jan 2018 11:02:46 -0500 Received: by mail-yw0-f196.google.com with SMTP id j128so5088516ywg.7 for ; Tue, 30 Jan 2018 08:02:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=ZzdIJVb69pYm9Q1EtQIXLC8kqp6f9mBVZIN5YJua/0A=; b=W3omdGlpudLAbG/gPTSq1cAhm3Zvt58bgV+xKoneim75pbxuWNYQcqT8uUsFCZ35fS JTlrjBkM8pjlHmV27PL66GhjhY0NpSHRTGtBNz19CUxHy2XgLQ2YfPWj6a75Hfl3TpJo yvZ067doWDBx0Vndwk6Pt0NrKzzye7Ttib5l0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=ZzdIJVb69pYm9Q1EtQIXLC8kqp6f9mBVZIN5YJua/0A=; b=VobitWGBaFe0PEmVo7x18+QIq8LVi2our4Ml9gcQ1bha/0WbHABN04NYvoel/icvLj bjPIqxz8QwDOvBKGfQxzjLT+eAueYqIV5MTPgarzHalIuIzyBv0j6n66BwlyWyR+dUyj AH716NiWu9s0Mjv31CDL41m8Ibpk3DhwLsV+r4lg7Z47XOknDpHIgMHcjfDD4eVwfbwB BGeNUjaSkEpTtNL47XXqLYc89A31iZV2/9WRf4bhRaeI4Kt4Qr9Jn7Iva39tAoimARoc nEskORiFfYi9RQztEpEvdaojP/e4Kv/7aANAV8YPWVL67CjT6C8m+HyRl1A8l1bxrh8I 9/ag== X-Gm-Message-State: AKwxytesLYV0+5ZA9zquCDXHWeGyAsaBg/39NMhwNLUbN/aw/qDWnU6T RyJZBjqtxgRrxSJ0a3dg2AkjtQ== X-Received: by 10.37.9.81 with SMTP id u17mr19522144ybm.288.1517328165323; Tue, 30 Jan 2018 08:02:45 -0800 (PST) Received: from localhost ([2620:0:1013:11:d3af:69ac:1964:28e8]) by smtp.gmail.com with ESMTPSA id w69sm5479572yww.13.2018.01.30.08.02.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Jan 2018 08:02:44 -0800 (PST) Date: Tue, 30 Jan 2018 11:02:44 -0500 From: Sean Paul To: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Cc: Sean Paul , "Gustavo A. R. Silva" , David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Daniel Vetter , "Gustavo A. R. Silva" Subject: Re: [PATCH v2] drm/edid: use true and false for boolean values Message-ID: <20180130160244.p24of44jgib3botq@art_vandelay> References: <20180130100528.GA7154@training> <20180130150927.3fm5kotyp6vqugaf@art_vandelay> <20180130151946.GC5453@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180130151946.GC5453@intel.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 30, 2018 at 05:19:46PM +0200, Ville Syrj?l? wrote: > On Tue, Jan 30, 2018 at 10:09:27AM -0500, Sean Paul wrote: > > On Tue, Jan 30, 2018 at 04:05:28AM -0600, Gustavo A. R. Silva wrote: > > > Assign true or false to boolean variables instead of an integer value. > > > > > > This issue was detected with the help of Coccinelle. > > > > I suppose you could also fix up the other preferred assignment by adding !! > > to the bitwise & operation. > > Assigning >1 to a bool is well defined. No need to clutter the code with > !! imo. There are examples of both in the file already. I don't have strong feelings either way. Sea > > > > > It's also helpful to post the spatch in the commit message so others can > > replicate your result (this case is pretty trivial, so less important). > > > > Sean > > > > > > > > Signed-off-by: Gustavo A. R. Silva > > > --- > > > Changes in v2: > > > - Use true for boolean value in add_detailed_mode as suggested by Daniel > > > Vetter. > > > - Update subject. > > > > > > drivers/gpu/drm/drm_edid.c | 4 ++-- > > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c > > > index ddd5379..b1cb262 100644 > > > --- a/drivers/gpu/drm/drm_edid.c > > > +++ b/drivers/gpu/drm/drm_edid.c > > > @@ -2767,7 +2767,7 @@ do_detailed_mode(struct detailed_timing *timing, void *c) > > > > > > drm_mode_probed_add(closure->connector, newmode); > > > closure->modes++; > > > - closure->preferred = 0; > > > + closure->preferred = false; > > > } > > > } > > > > > > @@ -2784,7 +2784,7 @@ add_detailed_modes(struct drm_connector *connector, struct edid *edid, > > > struct detailed_mode_closure closure = { > > > .connector = connector, > > > .edid = edid, > > > - .preferred = 1, > > > + .preferred = true, > > > .quirks = quirks, > > > }; > > > > > > -- > > > 2.7.4 > > > > > > > -- > > Sean Paul, Software Engineer, Google / Chromium OS > > _______________________________________________ > > dri-devel mailing list > > dri-devel@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/dri-devel > > -- > Ville Syrj?l? > Intel OTC -- Sean Paul, Software Engineer, Google / Chromium OS