From patchwork Tue Dec 11 19:12:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 153504 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp984317ljp; Tue, 11 Dec 2018 11:12:25 -0800 (PST) X-Google-Smtp-Source: AFSGD/VipLEihJGNY9dJbMBNS6OQaxVLYHpjPS5fo1qSe7AbArLWUP6LeKhE8bzL64dk3Vf/j3uo X-Received: by 2002:a63:9712:: with SMTP id n18mr15408344pge.295.1544555545172; Tue, 11 Dec 2018 11:12:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544555545; cv=none; d=google.com; s=arc-20160816; b=Mn0vCefx5mJHsvG94FkcgxR3MIzrZ0XaG3UMl1ue2Z1Sk9voVp3tcCGfBDZni4p4mw ahrVvXghJv0uyQb1isQVXwTx3Y20qpvrHMA5QNqKYL9NjzCflgH7qQgtP3q+P6beeUos cQfTEnzEsiVL9TfrVBGq/eucmA+SzR+ms8Pfivt7uEHA/mMaBq9IOuOr62LacFv0COD4 +tOOzFXnLuuBvQRacY1Eeq7eVyQaAUyj1Bleoq0YL+zA65QbxziQdnCsZqqYEzKKduW3 nsrHpdahg6m6ZbjOqykA5Q4SPA0AIsXqZ/i9J/iHeHEFa683kfwLALy939I89R34B7h6 UN6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=4GmxVsEkvur/HocmJaaz385vAXn4ukjjWJj68nJCE5w=; b=047yj736YoV0dSdd2PEQIlYDkMkfrK2gl42uNfEPmnIqNHqVWAr58pcpC8KcMjCywh KPPMKPH8W3yxuSEZxTBLPra2bUpjIMo6GFqqxx5G++V6LlK89RNGPa9Tl+w8rtkfsifR Uw1bwiQIw8zZHJrWdhkd4q1fRShEqPJli+Ca8ZiSdFmdgnGk37Juz51BExy3p4GeEyq3 huOANEI+ZPZ7Jm7+LrkPoYLhdQhbKz8amkqfz2pv0eshmpaOt4JrJtn5JOXzAWGxFx0Z 6D+Q8Y5WC612DKq3qmQU/UklJnuG/ZorqGlVEGxJJNyPpykkj9YxYAgfPEE36zLiMfx4 +lqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ktpdQXGi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 66si12970747plc.125.2018.12.11.11.12.24; Tue, 11 Dec 2018 11:12:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ktpdQXGi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727027AbeLKTMX (ORCPT + 31 others); Tue, 11 Dec 2018 14:12:23 -0500 Received: from fllv0015.ext.ti.com ([198.47.19.141]:46420 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726340AbeLKTMQ (ORCPT ); Tue, 11 Dec 2018 14:12:16 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id wBBJCE6h068867; Tue, 11 Dec 2018 13:12:14 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1544555534; bh=4GmxVsEkvur/HocmJaaz385vAXn4ukjjWJj68nJCE5w=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ktpdQXGiZdtYYB32VJRL68g95GI7Yhsv7DIhK1ziGwlF2BVvlqMo1leXMxXEPoepq iLrKwXk/M4tSySC5Vez2kMKRfHpTxkiyhynBsXvusiCA4UmwxXR1qZ0/QpGdoh+6X3 RLrl58Z78Wh+3ihT50YDQjbayx6IfdY4SRGtAPUs= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id wBBJCEtC010258 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 11 Dec 2018 13:12:14 -0600 Received: from DLEE107.ent.ti.com (157.170.170.37) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1591.10; Tue, 11 Dec 2018 13:12:14 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1591.10 via Frontend Transport; Tue, 11 Dec 2018 13:12:14 -0600 Received: from legion.dal.desgin.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id wBBJCEdu012041; Tue, 11 Dec 2018 13:12:14 -0600 Received: from localhost (a0272616local-lt.dhcp.ti.com [172.22.100.89]) by legion.dal.desgin.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id wBBJCDU05313; Tue, 11 Dec 2018 13:12:13 -0600 (CST) From: Dan Murphy To: CC: , , , Dan Murphy Subject: [PATCH v2 3/4] iio: ti-ads8688: Update buffer allocation for timestamps Date: Tue, 11 Dec 2018 13:12:06 -0600 Message-ID: <20181211191207.21900-3-dmurphy@ti.com> X-Mailer: git-send-email 2.12.2 In-Reply-To: <20181211191207.21900-1-dmurphy@ti.com> References: <20181211191207.21900-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Per Jonathan Cameron, the buffer needs to allocate room for a 64 bit timestamp as well as the channels. Change the buffer to allocate this additional space. Signed-off-by: Dan Murphy --- v2 - New patch suggested change by maintainer - https://lore.kernel.org/patchwork/patch/1021048/ drivers/iio/adc/ti-ads8688.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.0.rc2.7.g965798d1f2 diff --git a/drivers/iio/adc/ti-ads8688.c b/drivers/iio/adc/ti-ads8688.c index 184d686ebd99..3597bc0697ee 100644 --- a/drivers/iio/adc/ti-ads8688.c +++ b/drivers/iio/adc/ti-ads8688.c @@ -385,7 +385,7 @@ static irqreturn_t ads8688_trigger_handler(int irq, void *p) { struct iio_poll_func *pf = p; struct iio_dev *indio_dev = pf->indio_dev; - u16 buffer[8]; + unsigned short buffer[8 + sizeof(s64)/sizeof(short)]; int i, j = 0; for (i = 0; i < indio_dev->masklength; i++) {