Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp400089lqt; Mon, 18 Mar 2024 10:58:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVh9VenVp7DWx9TX1q7Qmw7+8X5arXOKFCbwB/LrV45fZkSyz/BOOco6ripdnSMbbpF9taqblVFyVwgOHEaF7RtypnML9gbc7ZuU8PNyQ== X-Google-Smtp-Source: AGHT+IHwd0e6k81sKMEWWgx4mqWAgBb8tUznD7LCajGTAUK+fxbN08JYIeFR+jJ4VD4G42tJ8tg6 X-Received: by 2002:a17:90b:314e:b0:29f:be68:5cf6 with SMTP id ip14-20020a17090b314e00b0029fbe685cf6mr1701645pjb.12.1710784734966; Mon, 18 Mar 2024 10:58:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710784734; cv=pass; d=google.com; s=arc-20160816; b=NFLNnS7os0gdRlVkA+XIWXWMXrlgvrgQIUvzM5VSwjHLKZlxI3sP8CQEhClwEYjfZL geW2Lp3NuVvSDY26jhpPQsYZ/fTDPZD8KftDnJVd3/dbiqOCSpDLOvVksQgTZ9tDrvuZ Ur9Ou3iMtpzD4Aeprh0NaYomqUMagFokdqWWw+OUIFJcoeP2cusuYyl0eBvBrlYTEkbT 3PV9CDST+grDhdViy8w7gpAsuZTN88NtL69gwf4wumGcgKuGPYo4SzGcTu2cUZUvA4J4 EB9o4ulhukGrZcgAhy5CBUzE6G73wFO9HcdOfYhzp894PgcAMtwuQfRgbjQuigVDId02 Rn9Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=ui-outboundreport:content-transfer-encoding:in-reply-to:from :content-language:subject:references:cc:to:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=EY0Hjw4+w2olzLszyx5nxJuGBBuLjuPZp0CFP/bSy4c=; fh=5tQrI4ELtqPlj5MImkSSIp+b59XRsBzWa0TTotIGnMo=; b=CwJRF1Rs7TtTBjviaQ27DCZAjrzVPDFY9CmnKTAe/F2SeNG0kixWrMZCpkZzqcyPEs NF04bOWl1qVtR+l13Ldm2qAcS7FVvlHM4dF9eOmWXkVb/6kTqa+rgZBGZCoXqBIBFhP6 2VCFCZEA6fVC2Y4VZjMNgIEGQzm4m22K3PxxgVEfG2xC3nozuLxae/67MJMK6Go09NWA qvL0GGUyt9aHzhNPbeqL2VLaa5tB9uRxz/8AQIQSJy2i7RxzxJbLFyORfzVvKZXJAmTh VrbjfBULGKgRLuyLm6quFiGWEYRXQ/+jU1AEjhSAQ8Cj3F132zuxiS9zry1itngXCpzA zqhw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=V0+kA6Ha; arc=pass (i=1 spf=pass spfdomain=web.de dkim=pass dkdomain=web.de dmarc=pass fromdomain=web.de); spf=pass (google.com: domain of linux-kernel+bounces-106487-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106487-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id q5-20020a17090a9f4500b0029bb5a4c03esi8506882pjv.96.2024.03.18.10.58.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Mar 2024 10:58:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-106487-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@web.de header.s=s29768273 header.b=V0+kA6Ha; arc=pass (i=1 spf=pass spfdomain=web.de dkim=pass dkdomain=web.de dmarc=pass fromdomain=web.de); spf=pass (google.com: domain of linux-kernel+bounces-106487-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-106487-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=web.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id A569BB215CD for ; Mon, 18 Mar 2024 17:58:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 960C155E60; Mon, 18 Mar 2024 17:58:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b="V0+kA6Ha" Received: from mout.web.de (mout.web.de [212.227.17.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 13CA455C07; Mon, 18 Mar 2024 17:58:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=212.227.17.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710784721; cv=none; b=akglDLlIlhG5at42Y4tSdh8eNopnHqyTZK5B9D4pG0PWmvIqvgY+Gtfy7hBaVvHBB3HMo8l4OqZ+xqAw4dtRaglhiT6WL2YR7RG5Fvwz3vkSb3Srr4zbJI0J+iAkIX19/+LpkgMhJBMV4FcHMh5xZfe79l57Zk1Hj8OMnwTWeZQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710784721; c=relaxed/simple; bh=TPxnDE5bkgZGAxq2z8iGbeup3QwNkwr5USo3SDnON2c=; h=Message-ID:Date:MIME-Version:To:Cc:References:Subject:From: In-Reply-To:Content-Type; b=DWiDlyPewrB3iklEiLu6BL7pf0/fKZJEbisx0nYciDFrz8F90bepAhrO12X+dgE5Pxt4aP2iAd/CPr45o0lFoW5HfoHe9IaqaXfKwIGkhFs33nigZgbCrhXm0KwEUnTT8Ns8CaaIHFP4/8uuZQ54KAZrrg7c5ksxUJ+KypzqRqY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de; spf=pass smtp.mailfrom=web.de; dkim=pass (2048-bit key) header.d=web.de header.i=markus.elfring@web.de header.b=V0+kA6Ha; arc=none smtp.client-ip=212.227.17.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=web.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=web.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=web.de; s=s29768273; t=1710784692; x=1711389492; i=markus.elfring@web.de; bh=EY0Hjw4+w2olzLszyx5nxJuGBBuLjuPZp0CFP/bSy4c=; h=X-UI-Sender-Class:Date:To:Cc:References:Subject:From: In-Reply-To; b=V0+kA6HaGYAa/C6ly7UFSp2H0nnpDWqAKynSkm9PMW1zp4uwDho8xbcsfVta02IC TECMyfpHJAgb6tzjOatfb4qt4pKi5/jxsWJBWHFhKpSrdkp538aOPB6WOYHfVjOyy qIT67Jp8LptmP5kgPUS6JDfSSdeVkGMpSYzZbTdb55Vl0cj/BrGPqo+0CcqbnCpWU leM7PVYh0icWowhyZfGGQKJff78MCjMUTx/hmO4gqEvwGILyUlNBeeRIMZrDWYkB5 pPUbMmuiGZk200j+p9N1ctRaN8P6SDZN3pBPF/GuNoCOzlmVtewNGA2UcpsHYo0zv eiW33T1QVzxs8Zhb5w== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from [192.168.178.21] ([94.31.90.95]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MEUW8-1rXUSX3rQo-00GPBA; Mon, 18 Mar 2024 18:58:12 +0100 Message-ID: <4fe6f68a-786c-4e3d-b97d-847d6965d1d3@web.de> Date: Mon, 18 Mar 2024 18:58:10 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Ayush Singh , Vaishnav M A , devicetree@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-spi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, lorforlinux@beagleboard.org, greybus-dev@lists.linaro.org Cc: LKML , Alex Elder , Arnd Bergmann , Conor Dooley , Derek Kiernan , Dragan Cvetic , Greg Kroah-Hartman , Jason Kridner , Johan Hovold , Krzysztof Kozlowski , Mark Brown , Nishanth Menon , Rob Herring , Robert Nelson , Tero Kristo , Vaishnav M A , Vignesh Raghavendra References: <20240317193714.403132-5-ayushdevel1325@gmail.com> Subject: Re: [PATCH v4 4/5] mikrobus: Add mikroBUS driver Content-Language: en-GB From: Markus Elfring In-Reply-To: <20240317193714.403132-5-ayushdevel1325@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:r2F2bDMqhKgRohtQ/KunHakzfn6SdVEejCaMS6iHsj0TxlpYJDf RrWyxna0jlyusRSuyumnI75ggM8jsvsRXuSkQ+/ETO/lUp0oSXC9pz2E4IlOZ9wQh6jBCds bS85YDJhYeS6L89hUauyhAwrYwYEqHG2jr+keShniaDz4CFsK+CsnljCojrVTaPQA/g3eCA Ml3JtrgsjHUHmOJ/28sfw== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:ghagHPhdV3o=;yuht04V33nbPduIWJm5LROvF4bF /mLWU5oe42zYF7JLibuZkzWFb+gf+YmBIGHGdYu4UCfnOp1aiD+sRl3R7M76F3vkCAhgLNcOF YjrgrL7+payvk4Wh2j/YXEAp39TNY52nowu6jOq3so6bt55wnnr5IqPCqWTUA6dhWuzeAwgBY SCwBY2LDqW/iwYqiS+5uqWMvA47t+fIgy2ir9HyQBMjF/UUtv/cfjIft4uDta4ez6rPWaBBmh qaUoej3dKW0eeEUNPLLWqqasPR+aYU6deVd+jKgXBCDFV8J8nofHQiO0aosdcgnILhANO1boy jgUU6rkvVXubH6a6U7HQwbdKWNoi2Iy8gQ5PbyoQwlzWno8Yx4FJJKNv1saruY0/YAbamVukN u/CSjXJfPAseIQrjvH49stmGF7mDfANdB7bAvwpkdB8wbzOn4t8zRWLRfbDYXDuf592Qpd5eo 39pT6uzskfyulbIaJXoT/dGDq8ctIlTfqRSIGFfHYuCyxqA3HDTJVaY8s/cBK+RUqXcB5k+yW MAJmdQt3fCxZkTVTfPkzdNdL+5UnmM2uilI9Fuf7Gz9fRmTe+xl4aD+xqrnEr9ZepO0VLu9vF owmdMlWsWtxpofgSPasQq0DC3kgfG2amOqvHHIO0gFJYk7iXrJzp4RzkfWfhJIw/RglljeDdP w9aSMI+WiY6LOREuBw7/GjP/jhF4xDv0Upy68hS4CyIAXctr0/7OysI0PRa1iiRayjj7DhR4z 1HtmAUAxid+S57vX0IMxdlzb52Tfl0xs4rwm+MEh4WjqI8sQUReeKqpeAPExHAMVh831maXZV Hik+fmwx5psU57Jpl6tquYdXEHmYGXV+ZW7IKksyULOdc= =E2=80=A6 > +++ b/drivers/misc/mikrobus/mikrobus_core.c =E2=80=A6 > +static int mikrobus_pinctrl_setup(struct mikrobus_port *port, > + struct addon_board_info *board) > +{ > + int ret; > + > + if (!board || board->pin_state[MIKROBUS_PIN_PWM] =3D=3D MIKROBUS_STATE= _PWM) > + ret =3D mikrobus_pinctrl_select(port, "pwm_default"); > + else > + ret =3D mikrobus_pinctrl_select(port, "pwm_gpio"); =E2=80=A6 How do you think about to avoid the specification of a bit of duplicate so= urce code here by using conditional operator expressions? ret =3D mikrobus_pinctrl_select(port, ((!board || board->pin_state[MIKROBUS_PIN_PWM] =3D=3D MIKROBUS_STATE_PWM) ? "pwm_default" : "pwm_gpio")); Regards, Markus