Received: by 2002:a05:7208:70d5:b0:7f:5597:fa5c with SMTP id q21csp2212911rba; Sun, 24 Mar 2024 06:51:48 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXIzu9fGtg/V7HVfhW5uy3/3AOS+D00fqRFgUwUu4TOEFCa6YHhsuinQu4SDYfnr97VukyypRf0e5Bap9fMf1h+i3Pg6jcfZdvaKHUR3A== X-Google-Smtp-Source: AGHT+IGK5seq7wbQElG3T64CtL2+G/kdgd8Uylit7K0FmDAFq1kK5s1hpEAKKvNw53IhqINGphZZ X-Received: by 2002:a05:6808:4488:b0:3c3:85e3:e598 with SMTP id eq8-20020a056808448800b003c385e3e598mr7235727oib.17.1711288308654; Sun, 24 Mar 2024 06:51:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711288308; cv=pass; d=google.com; s=arc-20160816; b=Z+7jnLxwbGN6g8Dt6eD0p/gqR/xWA5Lss6SL1/6kqeYJTuVJXI+B+kac1XMsSaB4l6 hXVyIaAnThLPCY3dxfH6JeQKjiBScW7L/cQx7RRvV3NbVQfHXS+NMTbY3deZYT3rY1rg 2fklbQUcCUfP41972bUa0rc6qcb3DYWmi5FnOc5JRsNYI1t6sb4KcSqLYoT1+DDNMDzt S4+WuyLiVJflH985MdbTw6Q5HShM+DOrzxmbzDc7FgRcOsJJwvaBcTrnverGPvghzQgR T4ZVNv1S703+JwnB2GphetRrqGTyG8QnSj6knjzipjXogXnzy30lOzFyhEQ5u06xpPBH W+tQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=4raOvrZa4vHJxFB0R5d/4ZhUy1TNld035tO+JEta0kQ=; fh=BGqEeM/RkHw6hnQvT8nRkKnKHca7bOOE9VgrWvp+F1Q=; b=TvcrSgWbecxvFMguvcyYqlnU3SUrtceejNF37c3neHCGu0uCs2ni1coaBansQbjhVa yI4UNQl0haAzxtpNIKDOW17uWY7pqVZL76xls1f0rANnGVTTcTwoJiYXbpH6q4KDO2k0 ykwv0zHsDwTE9ohLifB7PSmNupeL1bxHHp8FHGBQV15linng5h1tjHoYoFrV39s7jyit myjh4QO4F36+qG/UM0QGPJZsTSU1qBj0lFUsrZsH5+lbtVpYi+VFrNHHJ24WuerWEyUb tKojQZtaeptuZQRB+A766+7Y7b0smWAb7Cx1R7rvh86Z6moN93rUaZnMQrS7d51nwGKf Offg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="EY39n9/2"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-112685-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112685-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id c190-20020a6335c7000000b005e5271aafeesi5974732pga.403.2024.03.24.06.51.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 24 Mar 2024 06:51:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-112685-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="EY39n9/2"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-112685-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-112685-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 C930CB2101C for ; Sun, 24 Mar 2024 13:51:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1D9B817C9B; Sun, 24 Mar 2024 13:51:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="EY39n9/2" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 458401A38DA; Sun, 24 Mar 2024 13:51:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711288283; cv=none; b=m6Vtv97N/3FpasyS/qXSjQ+gj2MMpnRbiVhdWvouQ+ICOn8Wp3ZAVxJK0oIDN9Zx1f2qSd4b9b8+TQRrBDjEEjfRQjL8WE2Oljef0NCBrA0mG926sb95pomVRVEuFZB2pGCV/UpjwZJdE3QebVUDTRINdRNn1aGZIKx936WooH8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711288283; c=relaxed/simple; bh=Q1qsaNc4Xf1RFSr+vL9gGoT1ITWqAgeVcD4vzkh8OOU=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=V/KLuJso9tM53Wzy9UtwymKb0wEQgh8E7J/rwNj9coVIrinNVXLtWWCZ0KDKxFye9cwypg05EHDmQTFrfy6UylWijetpCTawvNoh6AaA0xRco3g/f+UAGOZ7pt0/OQADXyskj9Wzvc9VzADRXRJu+vD+cdTRe5maX5rlMaDuZ1w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=EY39n9/2; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC09FC433F1; Sun, 24 Mar 2024 13:51:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711288282; bh=Q1qsaNc4Xf1RFSr+vL9gGoT1ITWqAgeVcD4vzkh8OOU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=EY39n9/2Iz9Dw5jZ6/LFN/6DfJYpsBVf8aF1plriJ8crGr/BSN4Xpb+MXOlnj98a7 TUaddxR9bi3Pao2Vg9lCO+XWPB11WobJTJY+Ms8JdLAtM8kqaJh/PYkJRR6ytyEnfb 0Rd7jp4FS+6DQiwGeaTBtYCFMiyQu0A5epbtn1+kq4URa+0kJaHsLF2IiDC5/esIjB k4OBXz7PxLKid0bb0jF1OzNsjqNdAPf3Y3P2RAoaSwLf2Jzl4u/tONSM16OuKZePDl SCeHhZxD1l54+YUunXtspAgqWgWvmfUnH+JVrHv+DqPvdexbxS+gUXpQfZb+eIZ2ah 7Qy3c1rY16pwA== Date: Sun, 24 Mar 2024 13:51:10 +0000 From: Jonathan Cameron To: Christophe JAILLET Cc: Petre Rodan , Lars-Peter Clausen , linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-iio@vger.kernel.org Subject: Re: [PATCH] iio: pressure: hsc030pa: Use spi_read() Message-ID: <20240324135110.1e71572d@jic23-huawei> In-Reply-To: <8327ac591d244ac85aa83c01e559076159c7ba12.1711283728.git.christophe.jaillet@wanadoo.fr> References: <8327ac591d244ac85aa83c01e559076159c7ba12.1711283728.git.christophe.jaillet@wanadoo.fr> X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sun, 24 Mar 2024 13:36:16 +0100 Christophe JAILLET wrote: > Use spi_read() instead of hand-writing it. > It is less verbose. > > Signed-off-by: Christophe JAILLET Applied to the togreg-normal branch of iio.git. Thanks, Jonathan > --- > Compile test only > --- > drivers/iio/pressure/hsc030pa_spi.c | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/drivers/iio/pressure/hsc030pa_spi.c b/drivers/iio/pressure/hsc030pa_spi.c > index 818fa6303454..337eecc577d2 100644 > --- a/drivers/iio/pressure/hsc030pa_spi.c > +++ b/drivers/iio/pressure/hsc030pa_spi.c > @@ -23,14 +23,9 @@ > static int hsc_spi_recv(struct hsc_data *data) > { > struct spi_device *spi = to_spi_device(data->dev); > - struct spi_transfer xfer = { > - .tx_buf = NULL, > - .rx_buf = data->buffer, > - .len = HSC_REG_MEASUREMENT_RD_SIZE, > - }; > > msleep_interruptible(HSC_RESP_TIME_MS); > - return spi_sync_transfer(spi, &xfer, 1); > + return spi_read(spi, data->buffer, HSC_REG_MEASUREMENT_RD_SIZE); > } > > static int hsc_spi_probe(struct spi_device *spi)