Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp1563674rdb; Sat, 10 Feb 2024 07:13:06 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWt8rTNJ6S9fbBiNOQM2XVbidyxWzQn4t4OMzRtcqSl823SsKJKa71HZ+xTrdS0LyoY8devX5glMxlNh88jtqwSvl1Ds5gKnsQQwIquhA== X-Google-Smtp-Source: AGHT+IEz0l6wWuZdycvWCQck8gH8bMh1DKG7rMOYrQOJ6KvWISh7APbUIc6IifeO5c0jjiHR3Ncs X-Received: by 2002:aa7:d752:0:b0:560:6518:8ac with SMTP id a18-20020aa7d752000000b00560651808acmr1503357eds.2.1707577985981; Sat, 10 Feb 2024 07:13:05 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707577985; cv=pass; d=google.com; s=arc-20160816; b=Q73AK6+9zgL0STCLxhAd/8Hh5Kf/C0Z6IsVi47u1x5vd7b7DNZcJB6uVElC298tgim +Ht8rMo/gcc4YbE7tYfRgFVj6qFIfTf3ycW9nKnfh9lGP7A/XcJNgTPhoKGHcTbC2JUu SlOuegGV0V7s7OdXIUu7xsPiQU7/8AR1+hw/rSjUggXJD86X9/7dLTmQPneswruPj2cE Wx3dPlqRxSB+BYXyGW+y+KgdcubF25/ddR9I5na2nBoY13dSF51/FQ1Z/8EtrZeVDxlj fueX3/9GI2ynrPWQlYRNEXAm4+vBgWQ5JVgI6h8HceXxkuHImZGG2VvIUtqB81LAGo9n pUhQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=+3TVv5k2kyAT9B3mGBJu/+NC8ZeTvIm0YHEVTPnOgPI=; fh=X1o7HNQyxYjDcfLSly0soEZ7RaHwKTp3WLaQncH4m28=; b=NACDF7nRnfiQGVMMp5F0fEH0oGG6mSZqwu0Y8LCXMz8aEC1UW/1n0QtjF38fmY1MJJ t8XGXOMt1V7NfEpPjaILOt/LVj9PFo2lBLbrqDBReDZ3rWt3WBlT9/17yhiLy7SGWw9x PTTKzEbyOSQpzYcUGa60NrVEXEUy2CixBm8ailYKTugNg7zsxcpRprbb0f4BUwbOWTcI RBJPgfIhiK3q9IY2OsB7rZTsGtOdCvgwsTJ6PS+xIN0XLK0DjlNnNv6T7PVxU4CWviZG eZWqN5YOLOFy2eqRMPTNP7e77zX7ZqWUJ3mNHyfP5abqQNhuGPNASxtzRe01MMScdn4P qM9Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=drY9zONF; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-60432-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60432-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com X-Forwarded-Encrypted: i=2; AJvYcCUTieFzYBKrE/WFrwXNb25Gp/GVawvuIk5zPUd5O2YmXCb2kGoHLP7frMBQr4C8Re3BVjU11zbUE0KUy4DezHN1yDLm7dw4W/pNcYuXUA== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id j27-20020a508a9b000000b00560d6e9cd4esi855457edj.335.2024.02.10.07.13.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Feb 2024 07:13:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60432-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=drY9zONF; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-60432-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60432-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 862141F223D4 for ; Sat, 10 Feb 2024 15:13:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E63225BAE8; Sat, 10 Feb 2024 15:12:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="drY9zONF" Received: from mail-ej1-f46.google.com (mail-ej1-f46.google.com [209.85.218.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8A1845BAD7; Sat, 10 Feb 2024 15:12:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707577975; cv=none; b=ccpkSIIzLkPEeqcrQqb+T2K4WaB96FCnZ6EU3BpZe6507Y89Yz5dXpW4HS4jVkDNVhpivsjiGbfTdrQAjHq3r5I5qRtmAbjqujktXWOd9yK4AQMhbmPUtlu3nO96lCLUgzvB6QlNPd/7xSvnFu57BxtZ0VmZovMxbeh8yb4ynMU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707577975; c=relaxed/simple; bh=pFaaGu8xoLVFZ/xkilJYNOhe4SID+w1X5c35gQ2D4N8=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=G73qZmUY7Ufbl6HjMQ4lfXBzwOsZIWJp24fP/R6Wea42ZKkUxru5Ia59NbeL0UUqB8JZTddUykHB7UXDxUGMQZMxv9AdiYGcbsUTNIeKGafTLusZNZfB6JmvkppF+2a/mbsfn2U55aJnhGzSrHadoCOSDS3RBm3SwrLdex+ekPQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=drY9zONF; arc=none smtp.client-ip=209.85.218.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f46.google.com with SMTP id a640c23a62f3a-a30f7c9574eso224008866b.0; Sat, 10 Feb 2024 07:12:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1707577972; x=1708182772; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=+3TVv5k2kyAT9B3mGBJu/+NC8ZeTvIm0YHEVTPnOgPI=; b=drY9zONFSzORINl6XCIFvo79ZajUSnDMTIi5Z2pkeUtriMoLploPMitogmDxXR0zK8 YThSUTO+ctSnAIrs0FKI/cwj/tNqgdwuE1Aw+R061FazqgKi8y/q3h1un53ulI9FdT7v GYLmECx80L0+K99dYT5K0Pzd+6nn9wpcTGGJze4OcLOpJShVaczkdNXUHg3GtLHMVw5g BfPQ7kwGLVslMb7rJJOlvOjcMmsQrzY8/CNrMn5gH3q8hhaupT93r9jH8TdZLYC0WD6y 9g5saM/lOql1se0qoTFqZa/4Ipj70SIxDH/i07L4Hmd6VIHtYiNbBZiM1fqeuy4/urtP 2Gnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707577972; x=1708182772; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+3TVv5k2kyAT9B3mGBJu/+NC8ZeTvIm0YHEVTPnOgPI=; b=q6h08W/QnacZCsopr+PqOmC1TDVw7LMJCZYymWUKjWHWCQm+ubacDDZo+xbLh48GqF mo0A8lLfpO0NiEz1Lq09bwD/CaydkVPmhTacx/oGH/lH5heuS9kk6+MB5os4Ai9DDUsW tL0TwUwLPoAVqhLiXyPJ1Rv8cgLK6VXp79kMOPwwH0RdcF/9XbGHl8uYO/eg4o5Q36xj 4MQAf+e8RMRe3vV8lF63BWjux1NTL3DiE1GJ94KJIzllgrm+75jasf5LUPmgnxGu2+IT m4RBCGE8CPDESCtSCGW6Ts/pPx1lbUW9SFptlz/n0+PbksNhfcNclBFN5fkrOYB8Etzr cKeA== X-Forwarded-Encrypted: i=1; AJvYcCX6V4t1etB46k6cd4E2FbX8n1Se6kVBrH/BJUSconReh/MG9NtgF7Oow2YUL/Tqx6XkDxZ+r4FKXO4UDoaKZgoSxwjaGoZ2hW0jhOPdTK4oV0KMWLpFgV//RbWBrKUzly+8Meuyh4qS X-Gm-Message-State: AOJu0YzNKFjASpPG08DQEyHBB/e7eOZ5OjBP/Inr9rS5FFdqRI/e84DN 3OnoXbY1QmddxwKqL98XgXoIfE93ighTXOEsyfM/IShpiHpH09dGQRpUfBl8LesDbNlATdmhEbO e96GJ+SrDTDiT0n4Xp5iQIRXucng= X-Received: by 2002:a17:906:f190:b0:a38:4ff3:773 with SMTP id gs16-20020a170906f19000b00a384ff30773mr1435431ejb.47.1707577971557; Sat, 10 Feb 2024 07:12:51 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240127160405.19696-1-petre.rodan@subdimension.ro> <20240127160405.19696-5-petre.rodan@subdimension.ro> <20240210150907.40e27f53@jic23-huawei> In-Reply-To: <20240210150907.40e27f53@jic23-huawei> From: Andy Shevchenko Date: Sat, 10 Feb 2024 17:12:15 +0200 Message-ID: Subject: Re: [PATCH v2 4/4] iio: pressure: hsc030pa add triggered buffer To: Jonathan Cameron Cc: Petre Rodan , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, Lars-Peter Clausen Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sat, Feb 10, 2024 at 5:09=E2=80=AFPM Jonathan Cameron = wrote: > On Mon, 5 Feb 2024 18:39:02 +0200 > Petre Rodan wrote: > > On Sun, Feb 04, 2024 at 06:03:28PM +0200, andy.shevchenko@gmail.com wro= te: > > > > + memcpy(&data->scan.chan[1], &data->buffer[2], 2); > > > > > > Hmm... We don't have fixed-size memcpy() :-( > > > > __be16 *ptr; > > > > ptr =3D (__be16 *) data->buffer; > > data->scan.chan[0] =3D *ptr; > > data->scan.chan[1] =3D *++ptr; > > > > is this an acceptable replacement? I do not understand that your concer= n was, my > > intent was to copy exactly 2 bytes over. > > Andy? > > I'm not sure what you meant here either. It was just a rhetorical remark, no AR implied. I.o.w. the current code is = okay. > There is an existing oddity that the read_raw deals with this as a be32 a= nd > masking out the right sections for each channel rather than perhaps more = logical > be16 pair here. --=20 With Best Regards, Andy Shevchenko