From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1388DC4727F for ; Tue, 29 Sep 2020 13:12:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AD13E20848 for ; Tue, 29 Sep 2020 13:12:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601385176; bh=2rl44aidI3q+YJ67zNfJz2z3LJuhtx2vNYInVu39t9c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=0W92uto7NoDZCv/7+gMPXVm9+I76AiGqBbzS6xcOCYKPcoj7YH75vAzaCkfmpac3k Ubtba8nE6WRC+5+j93a65Fhg+zilReWkIlQ6RO974M3VhNYo6wrDFI4qvyw8GDgL92 XnaPp1kJzfxv1Ls5odQWNelhAyiFSiowM1E6lfW0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729787AbgI2NMz (ORCPT ); Tue, 29 Sep 2020 09:12:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:57772 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729363AbgI2NMx (ORCPT ); Tue, 29 Sep 2020 09:12:53 -0400 Received: from localhost (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EDB85208FE; Tue, 29 Sep 2020 13:12:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601385172; bh=2rl44aidI3q+YJ67zNfJz2z3LJuhtx2vNYInVu39t9c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oxOf2Jt/xCnYJi6WX3kh0Yk4uHi44l0tqvXJqn+0wELxV2JcMAB4ecyfSDL+ZrG1i nj5zBUWZofzBntN0foiDSAK9XvGMnF3EquTu+mtVQPyqTWtvNFE5NYShcqNIMZnXIk ZowA64huVCkLUGkJx0D06y4l07GXH7AFJUmVGODI= Date: Tue, 29 Sep 2020 14:11:53 +0100 From: Mark Brown To: Serge Semin Cc: Serge Semin , Alexey Malahov , Ramil Zaripov , Pavel Parkhomenko , Andy Shevchenko , Andy Shevchenko , Lars Povlsen , "wuxu . wu" , Feng Tang , Rob Herring , linux-spi@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 02/30] spi: dw: Use ternary op to init set_cs callback Message-ID: <20200929131153.GD4799@sirena.org.uk> References: <20200920112914.26501-1-Sergey.Semin@baikalelectronics.ru> <20200920112914.26501-3-Sergey.Semin@baikalelectronics.ru> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="LKTjZJSUETSlgu2t" Content-Disposition: inline In-Reply-To: <20200920112914.26501-3-Sergey.Semin@baikalelectronics.ru> X-Cookie: I left my WALLET in the BATHROOM!! User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --LKTjZJSUETSlgu2t Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Sep 20, 2020 at 02:28:46PM +0300, Serge Semin wrote: > Simplify the dw_spi_add_host() method a bit by replacing the set_cs > callback overwrite procedure with direct setting the callback if a custom > version of one is specified. > - master->set_cs = dw_spi_set_cs; > + master->set_cs = dws->set_cs ?: dw_spi_set_cs; > - if (dws->set_cs) > - master->set_cs = dws->set_cs; This doesn't look like a win for legibility or comprehensibility. --LKTjZJSUETSlgu2t Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl9zMpgACgkQJNaLcl1U h9BCEAf+LUL3IhFgY8tpN/cxDegxeKq+2luBPnBzkz4mnoVIAU2IRLjszEkA1AhE 0+Ggq8GQjaAllOEKlP+yALng0JAQgCX+Skvlxy7O00I4nWdwVFf92r8KSh/0TUTW FFplexpsYJlLNN7XosVsuKKc2pzYXmp7FhBAklu0VBHUi/T/cc76veo5sTIZuaUM eVq4MYe7cbczRQ53QvqG5CJmy4QS3h7KkyIcuSkEouR/FNKMHBLliK5E2ybbO5k/ nfNnvkbKWQpnDj58C7/Gx3+X6419zptudbKW2OCmYqJv2QaHSgc1SqDhFHRX5Ue8 IHcUc0pLkvjrl2hTn5TEtwhQhOMBkQ== =eJqS -----END PGP SIGNATURE----- --LKTjZJSUETSlgu2t--