Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp360575rwl; Wed, 5 Apr 2023 01:32:14 -0700 (PDT) X-Google-Smtp-Source: AKy350YxEOgQwYIj8Q+/clg04w9BDej6FGaG3DuzJ8+6nj60uaIjVZ2z1poAjf2jQBryC1I7u4YN X-Received: by 2002:a17:906:854b:b0:92f:ccf3:f0ce with SMTP id h11-20020a170906854b00b0092fccf3f0cemr2056624ejy.45.1680683534017; Wed, 05 Apr 2023 01:32:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680683534; cv=none; d=google.com; s=arc-20160816; b=Bp/MQ6NWdx15mNGTUnvjprhiHIDLIEeGHjxsXDIQ7m5t+OLw4aBGd84Zd8g9rQn8Vg 3fAHL5pzUUl33r6lyTrlvs5mrl2ZphJte7jkSjk45NrWzAeuF3QaOR0SeG/6KBc61jma JpLl6RsOpV+a4a31iEynweA9ec4I5H5i30hnAkenOcYU9klCdZ9hHmUkjuCXN7yNG5L7 py7CnTt/U78e/o0K75QIxvn6WlLcYnkrvBvRMUTO4f5zNjeLF2xe+EB+rqU8v6D2I2lU yKtAjtNAp2efT+Mr9YswFJxrlsfz9EBuQgVCmf/F/SpI7YU2wVC8YH+UpUUYSjmdXVUA Cs/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=5dyZMKsNnc6iWQ1eGTNI6EbsI0CvRi93W73m61q0YtI=; b=bLi587pjPUtbXx8uKOa+JSqipoIEW902gtMyHZciqMBhrJkbQQgam/VM96N1kiqmQE w5glcKivgr6UwXD2aER0oybKqgHSrTy9k0UdOzC3BWwghsGTnO1+5LvsN5nxaEPgFp6c 3G4/VPS+pO5/sDpl/0TN/2yoAInSW+dY3pe2RMTtZoyV4Txb3j4CPb8UYibj8eY7A7kC 8y+iDkcHHp5rmOxAd/91VKwJM5u0JKUGGnV3R3AvzlTgooof6qjjotakh8MJGJDM+B9G AyvB3pCCZ1RfEu4ajoOC9RREnO39apac7GmWCAPYaGgDllRSJCE5jzTE/wUXsf65Nn/W Y5Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=OWdbU5WV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i21-20020a50fc15000000b004fc68e7a3d1si1311015edr.206.2023.04.05.01.31.47; Wed, 05 Apr 2023 01:32:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=OWdbU5WV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237141AbjDEIS1 (ORCPT + 99 others); Wed, 5 Apr 2023 04:18:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236934AbjDEIS0 (ORCPT ); Wed, 5 Apr 2023 04:18:26 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 135BD1993 for ; Wed, 5 Apr 2023 01:18:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680682706; x=1712218706; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=s+gE3xKmjAzbiO9q0nRNCzHxbc8Y1m+1bnOBrQ0u16E=; b=OWdbU5WVTpb6XV/zyDK03/2H58LIqZEDUm/VNqlyxY9E+MoPuThaCMvx jPyuaZEvM81CB+p2ncg45rIL8ppfav+3Eo2rc2f5vsA7qFf1TJXhePlF2 aFuGJ4DfynG+8r14RmqHm7ag6J2Vy10E3GIi12LCumqNrqrRQaQK8KKVw WFnHubsesvL+pEjiODakaB47dbj8M+AdzZG2SyyL1W0IrTNG6OpAhMrKD /wjlBksi0N42HEYhFRoYqULO4mt0uLcRfUKC+W2d1RRPhvkDWQ9Di1XSF Q3+2vYe8thuRnvzZVtp14MLS90PmZpT78/karbOG486jqoVfw/pHD6wqy A==; X-IronPort-AV: E=McAfee;i="6600,9927,10670"; a="322057024" X-IronPort-AV: E=Sophos;i="5.98,319,1673942400"; d="scan'208";a="322057024" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Apr 2023 01:18:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10670"; a="860890438" X-IronPort-AV: E=Sophos;i="5.98,319,1673942400"; d="scan'208";a="860890438" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga005.jf.intel.com with ESMTP; 05 Apr 2023 01:18:23 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1pjyLW-00CkOe-11; Wed, 05 Apr 2023 11:18:22 +0300 Date: Wed, 5 Apr 2023 11:18:22 +0300 From: Andy Shevchenko To: Chanwoo Choi Cc: Bumwoo Lee , linux-kernel@vger.kernel.org, MyungJoo Ham , Chanwoo Choi Subject: Re: [PATCH v1 14/14] extcon: Use positive conditional in ternary operator Message-ID: References: <20230322144005.40368-1-andriy.shevchenko@linux.intel.com> <20230322144005.40368-15-andriy.shevchenko@linux.intel.com> <6bb15158-829e-f032-dc10-110e831da8c3@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6bb15158-829e-f032-dc10-110e831da8c3@gmail.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 03, 2023 at 11:38:41PM +0900, Chanwoo Choi wrote: > On 23. 3. 22. 23:40, Andy Shevchenko wrote: > > It's easier to parse by a human being the positive conditional. ... > > const char *extcon_get_edev_name(struct extcon_dev *edev) > > { > > - return !edev ? NULL : edev->name; > > + return edev ? edev->name : NULL; > > } > > EXPORT_SYMBOL_GPL(extcon_get_edev_name); > > It is not fix-up patch and I'm not sure that it is beneficial patch. > I will not apply it. It improves the cognitive perception of the code, but I'm fine with no patch being applied. -- With Best Regards, Andy Shevchenko