Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp853981imm; Tue, 5 Jun 2018 05:38:00 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLmz1Nv2TB6TjLzxntyAk9BeU/HEZkAenota5CA33OB0BxwgJUoqAL/fPAptQKbqSAVtSSW X-Received: by 2002:a63:931c:: with SMTP id b28-v6mr20468573pge.167.1528202280405; Tue, 05 Jun 2018 05:38:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528202280; cv=none; d=google.com; s=arc-20160816; b=vZ+tA0hli698umzvA8Gu+kuV5hdRyalZc+Uom4GD9cQ4DhOvO2LFqO4QQ8rmtOs9ie hOcK40jfZ+NtYgYNihuCsrhfMDjKuXXCLtrfIz5LKnMF6yXbVDq7vxqM4DG0wpYcbO7n NX8tzSDC/sV6EF415LKif3QOzbmQ5Fxk7FPgblLN4IGKBFesgJXd/z+qHEqcc5v+j7/z EVARFt0uQqbAYE6TVyyYolyni9fQ6NxP669AQ+SGs5ry3XVAqhhDnOZvN4t0FOJIxTWJ ORlGkgmuwrDiszmFZ/Valw+XQ0udpFdL/WF1V/gsIluY7Qd9t0kZZdFaaabhTn+gHezv UKDw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=UWVk6Dq8/dTQcRX29olipmc75uxcFgCkZnTTVJOHRIc=; b=VcZR5qHZ3FPUlz+/2vatnS8JZqdzssXHoFBlgyjOtwZmWFFeCN8iDQ6AlVWumz8knj 7CaDz9ZuAGS3Cxx7AigysjyMwdQ8h8d/BoZYwL13ddIDHgFANZHWEWJ835bwjGV5eEiK rP6er/m3gxDpLAJsBtmLCc+23z8FwVFp3p8N6iWP8kIplBQ5Kt6XZjnxZL5S31ppqOmI oWVGOFWj2PO0g/4GcHSGt0+LP7Cs1umUyW/R2Qn4Ws/Wc3/w4zYmF5Jn3H8sFM1rA1fP 442De2/la/dwX20vvjF5N9m+DUhRsodn0IZCBck11jD0BwItHOqQDy5BsYEIjtWceu/1 k+Nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ejfUVmO7; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t20-v6si10839244plr.240.2018.06.05.05.37.30; Tue, 05 Jun 2018 05:38:00 -0700 (PDT) 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=@linaro.org header.s=google header.b=ejfUVmO7; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752000AbeFEMhC (ORCPT + 99 others); Tue, 5 Jun 2018 08:37:02 -0400 Received: from mail-io0-f194.google.com ([209.85.223.194]:39903 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751850AbeFEMg7 (ORCPT ); Tue, 5 Jun 2018 08:36:59 -0400 Received: by mail-io0-f194.google.com with SMTP id f1-v6so3127219ioh.6 for ; Tue, 05 Jun 2018 05:36:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=UWVk6Dq8/dTQcRX29olipmc75uxcFgCkZnTTVJOHRIc=; b=ejfUVmO7zt1JteenBQET5y6Q/obPQ6tdqByA8onY97vzPYhH7prSxWdpBDpOZtAnPQ Xgl8r+hK30XXSzIX7ScCW7bAOar2/CurGpxyS3NS6mhZvWauH4rgZ3a/bh/bDKxUuhyq nv7SHJeNtVNJyuD5yvxTSCz9p00JxlBbgYdJM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=UWVk6Dq8/dTQcRX29olipmc75uxcFgCkZnTTVJOHRIc=; b=jdxLW7/RuUtAbDPItOj43DQTY7Bay6AHwJSFf0w0eFWySXxUeR0LUs2RmNIVeIso90 Nvl8sc3O0YRJicdvt23mhjtbH9N0h69yIM7r8NRAxA5Pv+5CgwK/v/uDUQouybDrL12L W/oWlJdxRpFE3xIDz8R3exlVdlzWEApwp5nP+XbS3dykozZwTT2zxhmWlLOE2qnSWgbC CKYuL3coYO/RogSmhk2QO1aaGED1nmIN0NEQCC+FTkewum7NEYOCTwLABJZ6BdCDKrnT ntM+mBM0ut12FtKq3tmfgLS+LL9WFSv2mve8r2dmsPlI5rZFYx5+iHIPcPkjcNoiFNUR z2AA== X-Gm-Message-State: APt69E2KE2MGtaBC0/WdTTDi0+FgrrjdnMT+ERgj57OgSmrjxybz3W1E O8+cjnw4py5moiyL+MK94P5ikQ== X-Received: by 2002:a6b:9654:: with SMTP id y81-v6mr8739476iod.237.1528202218431; Tue, 05 Jun 2018 05:36:58 -0700 (PDT) Received: from [172.22.22.26] (c-71-195-29-92.hsd1.mn.comcast.net. [71.195.29.92]) by smtp.googlemail.com with ESMTPSA id z9-v6sm646675itf.8.2018.06.05.05.36.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 Jun 2018 05:36:57 -0700 (PDT) Subject: Re: [greybus-dev] [PATCH] Staging:greybus Fix comparison to NULL To: Dan Carpenter , Viresh Kumar , Johan Hovold Cc: devel@driverdev.osuosl.org, Janani Sankara Babu , linux-kernel@vger.kernel.org, greybus-dev@lists.linaro.org References: <1528030371-3822-1-git-send-email-jananis37@gmail.com> <20180605053236.u57riboa47so66rr@vireshk-i7> <20180605090051.fngwzwpzr37ynatf@mwanda> From: Alex Elder Message-ID: Date: Tue, 5 Jun 2018 07:36:56 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180605090051.fngwzwpzr37ynatf@mwanda> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/05/2018 04:00 AM, Dan Carpenter wrote: > On Tue, Jun 05, 2018 at 11:02:36AM +0530, Viresh Kumar wrote: >> On 03-06-18, 08:52, Janani Sankara Babu wrote: >>> This patch replaces comparison of var to NULL with !var >>> >>> Signed-off-by: Janani Sankara Babu Wow, such deep discussion for such a trivial patch! I say we take it, mostly because I personally prefer being permissive if there's nothing technically wrong with a patch, but also because I'm swayed by the other comments. That being said, I agree with Johan--the patch would be improved with a little better comment about what motivated the submission. So I'll wait for v2. -Alex >>> --- >>> drivers/staging/greybus/core.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/drivers/staging/greybus/core.c b/drivers/staging/greybus/core.c >>> index dafa430..5d14a4e 100644 >>> --- a/drivers/staging/greybus/core.c >>> +++ b/drivers/staging/greybus/core.c >>> @@ -48,7 +48,7 @@ static bool greybus_match_one_id(struct gb_bundle *bundle, >>> static const struct greybus_bundle_id * >>> greybus_match_id(struct gb_bundle *bundle, const struct greybus_bundle_id *id) >>> { >>> - if (id == NULL) >>> + if (!id) >> >> It is pretty much personal preference and there is no good reason to accept this >> patch really. > > Checkpatch complains, so it's Official Kernel Style now. > > The != NULL comparison is a double negative which makes it not less > annoying than official kernel style. > > regards, > dan carpenter > > _______________________________________________ > greybus-dev mailing list > greybus-dev@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/greybus-dev >