Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp4559508rwj; Tue, 20 Dec 2022 11:50:03 -0800 (PST) X-Google-Smtp-Source: AA0mqf6PQZ+YpRB+Ak6fZnYFd7au2l1qe0g4fcuZSE/WAdRP2VTfokydwsWYJ7SH2BXQLp6GkhyS X-Received: by 2002:a05:6a20:a588:b0:af:757d:a8b0 with SMTP id bc8-20020a056a20a58800b000af757da8b0mr25702425pzb.9.1671565803747; Tue, 20 Dec 2022 11:50:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671565803; cv=none; d=google.com; s=arc-20160816; b=ilELmNQPpeWBhD5hAD7iyLvJ94IdXCKOWSiTGOJXDOfBxwfoTjXZw9hlWGBlZDreyb V7zFS5e29xUSRrvzVzkgSJofDtMFXNc0BRqkmuwoeMlZdVFnd0WiAKrQvObdst2RELk1 uV3k/5smA0kYsj8WP6Qvmlm2XuWbz5Oo16p6AXNBXfUi9diqZ1HGv7bDCQOgvOelFlfw EDHI6DFvXanUWg4lGfsns46P2VhQ+83VDS5qIFDOudOFGTSb/I/1BnLRefPDPQUW3w3s j704iIwipUstrAWKXNCAU4OXfi43e/Ef25tCxTnklpjkNPjH/U2xUxu4O0cdACtE1Ano 4tJw== 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=fban5t2BHXx3OghiQQIAOEiDz2enfvLcDTp3UeO/eRY=; b=oQuBVo5qCWXKJWV8j82Aw9g//Ejm3ymsySb/vEiyYtEIwwQDLihCWRm5Iuok7pt85h StDfex9P4jQcC5nGDeJb/sQqtksYGtKlKRpDaVs7GMDN+NQ2AomGUMRRK46yM3m1nsDZ jKDV3zn/DYk/8KVoAjMYrztEM6/XmP6qBahFfJBKQaweRdW+Bh683hZrvQxgE9vRkvJe 0zFgHIUrreDqDhfd51d7a9uacLa+zw1e6j4ICgBd263XPyHpRxlFkfvZAEUZl/yKqaLM rAbGDgM6kkwwbMT6URhBUQ7PIoSY/8qdI/VcOBWCB+13xK3SHi6NTeKSZIgl/gXCk/mI A1ZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=j+kmq+Gj; 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 p11-20020a654bcb000000b0043c0b4f2b68si15132601pgr.318.2022.12.20.11.49.54; Tue, 20 Dec 2022 11:50:03 -0800 (PST) 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=j+kmq+Gj; 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 S234027AbiLTTSq (ORCPT + 68 others); Tue, 20 Dec 2022 14:18:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52374 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229791AbiLTTSm (ORCPT ); Tue, 20 Dec 2022 14:18:42 -0500 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DA181B796; Tue, 20 Dec 2022 11:18:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1671563921; x=1703099921; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=XLtecIj63O+kDbo1NYrvOFaDdZbwFbJUOPsY6/FAEzc=; b=j+kmq+GjB9/qz42cZp4TJ4Lz2ALhFAQBtm01NwvUMcbmRMk8d2UKPjCj ST9jB2pWmqa8FuppN0S/V7x7z2BUGfQDQThBkHefTK1h48jI61Exnx5ue Lip6g1Djv0IL0mDq+Vle7UOGu/vzNvzSzB0JboxOTqo+SQPpXHoq3H4A8 Y4C7l7PvwpiTM4ZBOzQi7QpgCJvUJ0hFylh6dVuuaWAS1edWBZtPjRRtU gu8XbbDaRs5+IlqxPyXxoboQEDMXAaNogamRKrTWRg21aj6re+tyWLIFY jjUBQlZDX5iglMtFvEtd5FOjdbKV/kGH9TWhx3zEUdjnkD2DlVQO+ZGKw g==; X-IronPort-AV: E=McAfee;i="6500,9779,10567"; a="307376770" X-IronPort-AV: E=Sophos;i="5.96,259,1665471600"; d="scan'208";a="307376770" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Dec 2022 11:18:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10567"; a="681768471" X-IronPort-AV: E=Sophos;i="5.96,259,1665471600"; d="scan'208";a="681768471" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga008.jf.intel.com with ESMTP; 20 Dec 2022 11:18:36 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1p7i8J-00D9GA-09; Tue, 20 Dec 2022 21:18:35 +0200 Date: Tue, 20 Dec 2022 21:18:34 +0200 From: Andy Shevchenko To: "Hawa, Hanna" Cc: wsa@kernel.org, linus.walleij@linaro.org, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, dwmw@amazon.co.uk, benh@amazon.com, ronenk@amazon.com, talel@amazon.com, jonnyc@amazon.com, hanochu@amazon.com, farbere@amazon.com, itamark@amazon.com Subject: Re: [PATCH v3 1/1] i2c: Set pinctrl recovery info to device pinctrl Message-ID: References: <20221219193228.35078-1-hhhawa@amazon.com> <4344f575-65f5-2fde-e2d5-3dd5a18d13cb@amazon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4344f575-65f5-2fde-e2d5-3dd5a18d13cb@amazon.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE autolearn=ham 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 Tue, Dec 20, 2022 at 07:07:51PM +0200, Hawa, Hanna wrote: > On 12/20/2022 12:53 PM, Andy Shevchenko wrote: ... > > > +static inline struct pinctrl *dev_pinctrl(struct device *dev) > > > +{ > > > + return dev->pins && dev->pins->p ? dev->pins->p : NULL; > > > > GCC supports Elvis, you can use it to simplify the above. > > How you suggest to simplify this? Using Elvis operator, which is ?:. > I can use 'return dev->pins ? dev->pins->p ?: dev->pins->p : NULL;' Have you even try to compile this? > > > +} -- With Best Regards, Andy Shevchenko