Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2881703pxb; Thu, 10 Feb 2022 07:35:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJyUUl+yWNvoMDQ0Uj40xGwrY8ikS4V+GafeLwjLhOXRzmQj7pmURQ+UFaRmEUSZQzZrAfmk X-Received: by 2002:aa7:cc09:: with SMTP id q9mr8899484edt.101.1644507313647; Thu, 10 Feb 2022 07:35:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644507313; cv=none; d=google.com; s=arc-20160816; b=etMxomBbgjOABSHBwTzA5ZG2wRMN1eYg0CE51vhs+Y6WrczVjpwR9cITe6MTKKyKYo rtPuoOozry+jVcQIl70ghvQ9svWl2ABYBAJvmsry39Wk0QqgFqBGZ7qnknj/37fYeMew UQeMgJlcHRB1rYLXowRQ6GTcwIFkt4Uf+ac+0Ue/ngpKFAg/bM2cRkWJyejTi0/RWAtC WPdxZ5wrEnwVWzVFPU/dpV1KiYTL33Cynv4kBY6911rw3+kGRhxcF2DidH7gqQNi96rD hURAzmiM2X/H51v1dLVIP8o0eZ2Hx+onGQ55z2DEnU5fUzkttGOEViD0R/vpyhO88ky3 PPRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=tgr+qxUH2QbhKybbqo9k9X5nwjY/K1cgQ6/1/4BC9ng=; b=eyYlASq+91O4EIBYpGbqE637j6+J5O0Cs+1n4NMvZ6d4eOn7Mn6nhSz7J4CZOH1PwQ iUJ+bTo+QGSie1onbyOoL8kzr4fuPPxQDL5lJRw3nCzKKinsblSmDC8pWP1j4ZOAZhCi 0YP1ZIOtoEOdK6E/QPbTlmdqzpZnBQH1+NFHEDz5eqBRVEq5WHc01sPFul6Lj5ebDW3K riInAcnkxvyQKD9nLrHNKI5wOF/1X/YfWys6WWy0j5fNWxD93IHAqu0aUgVf8c2V9HZL Pgxz7f6fPfPfl6PR8xxTLRIl+azR/Y02yvGyI1M8j+2pCQ78YOUkvrlIcYcI61FSr76Q Wnxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DhUQ3edk; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g21si11558917eds.649.2022.02.10.07.34.48; Thu, 10 Feb 2022 07:35:13 -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=@kernel.org header.s=k20201202 header.b=DhUQ3edk; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240731AbiBJLRL (ORCPT + 99 others); Thu, 10 Feb 2022 06:17:11 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:49876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240727AbiBJLRI (ORCPT ); Thu, 10 Feb 2022 06:17:08 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55B19CED; Thu, 10 Feb 2022 03:17:08 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 0610CB824B3; Thu, 10 Feb 2022 11:17:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3D18CC004E1; Thu, 10 Feb 2022 11:17:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1644491825; bh=TMs8T46JkhWD17MU6Q6kh4Ty1QD38Xu9BdNDq7RPTHs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DhUQ3edk3MzLW571/PRloWrgytbXeIkRYXtXwriXcR/RI7lDwDXHiuUTqZelb1aj1 6NHtzGGg1lNzCtJkIURNfxgMmZp5+RQt+wkFCopAOmBW0Sjg2ttpKB16Rt9+llEonP u6v8pi3P+sGxrByQRxTjhUsSR2HKCuIpempJ1D8C3tbOuux2BRN15ZyE9+Nb/R6cRb NorK7yUttFb5fjf2/2Dnrpfhu+GqJCxh2PAYkoPW7GjIpRNnWIm9xdfhltbn0RwBJ2 l+26CbuBJIaYmXPl4JxrG5T9do5TIkqzlPcmLs2uyv7QRB4omzGCw8fqaItTCAs9Us qfb02/AR36n4w== Date: Thu, 10 Feb 2022 11:17:00 +0000 From: Mark Brown To: Li-hao Kuo Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org, wells.lu@sunplus.com, lh.kuo@sunplus.com, trix@redhat.com Subject: Re: [PATCH] spi: Fix warning for Clang build Message-ID: References: <691d52b72f978f562136c587319852f5c65f08fe.1644460444.git.lhjeff911@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="rwzCgcqywFylgluh" Content-Disposition: inline In-Reply-To: <691d52b72f978f562136c587319852f5c65f08fe.1644460444.git.lhjeff911@gmail.com> X-Cookie: Only God can make random selections. X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 --rwzCgcqywFylgluh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 10, 2022 at 10:36:56AM +0800, Li-hao Kuo wrote: > - int mode, ret; > + int mode, ret =3D 0; > =20 > mode =3D SP7021_SPI_IDLE; > if (xfer->tx_buf && xfer->rx_buf) { > @@ -403,7 +403,7 @@ static int sp7021_spi_slave_transfer_one(struct spi_c= ontroller *ctlr, struct spi > ret =3D sp7021_spi_slave_rx(spi, xfer); > break; > default: > - break; > + return -EINVAL; The return here means that the initialization is now redundant and will stop the compiler spotting any future similar issues which isn't ideal. --rwzCgcqywFylgluh Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmIE9CwACgkQJNaLcl1U h9Du2wf/ZFQpNNtaTfjfELwDwMTkD6jFtGX/unYD+BAxcNttpg8+FKYN2j9l4rm+ wv+erGt9aIahmuN0SMZaQCYfhyky7rJH6Mhmte4Kiu5sqtLTu9es8+pavaDKx7ll SZ9IKd99bNHeHVm6jJ79zu85DsjvRMhXSpNLriX0WbfUNiUc1NeyfbbAiAsYitEe G7zVQgUBu7CtkorU3/AGS/UYJJciPX5C5A/+TpEZzKkmhqxhNjkLf+KEn7OKPyzc gdTadqmPydu46MpW9bF8Zl5OS5YW4xmVcmfQRRyoF3AmcBk3zxhpRFyshh5BYpwp ELaQSc01Z3E59r1IFLaPa4usbPo6IQ== =95y6 -----END PGP SIGNATURE----- --rwzCgcqywFylgluh--