Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2728821pxj; Mon, 31 May 2021 09:15:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwI4bLDJI5S6TkT+5Hs5TehtYvvy6jf5uBRddb+tYCU4gfOuMVv9gsk+eue/jsBO8vupoFZ X-Received: by 2002:a05:6402:3101:: with SMTP id dc1mr11508849edb.324.1622477717421; Mon, 31 May 2021 09:15:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622477717; cv=none; d=google.com; s=arc-20160816; b=HRyf0yUz1syEHLVHGDrHsWwpOHhOfTyLgBlQhHL4HpdD+xhae+xJ+floqnkkYfegZY APf0sesaeD3ouMdp1HXe/LCJbIaz7jKF22JOrpDW1Y01/NejjGzocvLOLOoxw+fbQyw+ syHp/CY9mK27Vrn8lc17kx8AJizhWNwD1hqUE1iMoHL9y7ArHtuVwzICUCjCuUgwmOFe /VVqjn98fRNvEIWyOu9ZgpFltStb7Gozb16rNRqnc4tDDWEdc50v2bCVyVj4EdfavVF+ Uw7N47n5kl8VD5CjY4hwbhD/5TeHNzX79vEf0GqaiRbmRcXYOVXqigtru+lKPv86NAuk zR7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8Y639sCRlrIHcr3GvtXep57fhojarpmgnkoaTAvV5eI=; b=PQ3rDHKc+W5QSiuNnNUTUPpDXJZ9DahelYNeE2quC+aJIITk9w3Eg5gNZtGuJblde7 Q0Fxp60SFJSOXxIh88TnSanb56Yfw34NFIAXV+OMcZWY9mpRE1Sxf93Sb1VfHS5XVp5g tKrrgA2JjwXI7pyE9YpEBCcL3EBIWp/EMTe2N9LQHD5VWzOWJOLYhRAs2sjR4W9LJ6Ko R/RXEawc9/qT8SU+rBfBkUqxMt3yiTxoPKDF1z3QeuwrbL4P1xCz9EDa2SHlbjPmv9T/ jupQID4ccwc/2mKaAap972FRI6+7HNx96/YnDDxpZqBUbtYvYaRJWtV67r++0FQKFyjQ 4RyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Y36f7CaZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t26si12723947ejd.446.2021.05.31.09.14.54; Mon, 31 May 2021 09:15:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Y36f7CaZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233002AbhEaQNB (ORCPT + 99 others); Mon, 31 May 2021 12:13:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:37024 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234052AbhEaOiK (ORCPT ); Mon, 31 May 2021 10:38:10 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8775861C5C; Mon, 31 May 2021 13:52:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1622469132; bh=Y5+dEpA0SfVXkbYtN5nq8rOucY7Lmnj4S52INcUap0M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Y36f7CaZoIPjnk5UbnJmb3n4stntX+JhkgT4YMmjrxn6zsEUiK9U+PcvsVIjVfqzB KsV5TNNjmqEG3oPmPvUf1/xfkya4cxDVQHFR1sDR0czMnKxmtvrOCUB3mksM8ZvwmO bLI2uRrIlHXYePpgQUUt+oEtj33afkn8LGQsC9Vc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jonathan Cameron , Daniel Junho , Andy Shevchenko , Stable@vger.kernel.org Subject: [PATCH 5.12 081/296] iio: adc: ad7923: Fix undersized rx buffer. Date: Mon, 31 May 2021 15:12:16 +0200 Message-Id: <20210531130706.584294092@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210531130703.762129381@linuxfoundation.org> References: <20210531130703.762129381@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jonathan Cameron commit 01fcf129f61b26d5b3d2d8afb03e770dee271bc8 upstream. Fixes tag is where the max channels became 8, but timestamp space was missing before that. Fixes: 851644a60d20 ("iio: adc: ad7923: Add support for the ad7908/ad7918/ad7928") Signed-off-by: Jonathan Cameron Cc: Daniel Junho Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20210501165314.511954-3-jic23@kernel.org Cc: Signed-off-by: Greg Kroah-Hartman --- drivers/iio/adc/ad7923.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/iio/adc/ad7923.c +++ b/drivers/iio/adc/ad7923.c @@ -59,8 +59,10 @@ struct ad7923_state { /* * DMA (thus cache coherency maintenance) requires the * transfer buffers to live in their own cache lines. + * Ensure rx_buf can be directly used in iio_push_to_buffers_with_timetamp + * Length = 8 channels + 4 extra for 8 byte timestamp */ - __be16 rx_buf[4] ____cacheline_aligned; + __be16 rx_buf[12] ____cacheline_aligned; __be16 tx_buf[4]; };