Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1909849lqb; Mon, 27 May 2024 01:14:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW/MzbwFPuy0vux2Syk6v0SRu0KKCUCwraW7XQ06ffnngkL6JWwB1ztVyOMKjez8d6T6dJ+O9Y6g3dqgqoiIelQcI0SKgCFELBeuhkNSA== X-Google-Smtp-Source: AGHT+IGIb3x/Ykb8LcJ+lnWzVi136eA8FWNTQJmaDIYTBWRWtlwbxVgN1wFKnd5LFSDzt5em/BWt X-Received: by 2002:a17:902:6505:b0:1f3:2c60:1716 with SMTP id d9443c01a7336-1f44883bfd3mr73339445ad.40.1716797671735; Mon, 27 May 2024 01:14:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716797671; cv=pass; d=google.com; s=arc-20160816; b=OvM2J7EpwH9SIxyRi9+H3IL7bs5/Qf1FF8Chchd0XXtnWcmRLdvDgC1U8Zcj+Q7CM8 q24Dy/ij1fFfPf+zH/HjY+sCLxmq5ehUD2jVsg9hruggph1cOmZnL2f0AThKFxMOQvLC RaBoecuIjEqhilqhcYZOOX4Wq3XbY0gUkex30wkcUqG2oZxzm3uob9ymexHU1CDrn+OE 0LIo+MgfBloa30GUsY0msyC9lSgGFWNHW1nDK79cQ+00Uqt/aXhxa+/QrHMaGY7FG0Tj bYRXsmbGcHwBDaWa1lrtjr44cRLUTD7zPyTn6XVkUrl9/XKxHWwCIFjTnk/Lnjun5pFW zKsw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2gOfFJLDZFM1NLZoeu2fRwYilxYpWgEWWcHQQR/WPKs=; fh=GuBsumKsPPkWmCscMe1VTo8gdqDvhdUYHmT306AwW2w=; b=DEFh0dyRZSz1blprtyvcrzSQQsyMN/F3EV9xkmlltwN5wAuHwJD0SxcWEXtMIVRTC2 kJB2q9GGXfYYZndhW4gYssm4wSTEqDTiSkQ4dnbkD8qX2/mDFIYN2RH1PWBAxJV4zcak 5foTu+GDtsFIyBeQrgaM0CCkKWfN2oYNO3JTyuEZ8FIA9ME/mC8tTn3E4zD8/eBQ8S60 5BNeqwzd5YEuBWmUX1AJUWL8rvhAfG7ybPU9qj+vaGYKsIvy2SYlVzP0IiBWI1ei7ZHc ysttc1t1tDQ7O2D1LtW/mGT6d+mbXtN4yLmbeqN6HfiM1bf3r5zrDnaYSxNbNA40pIOy Gr4Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="K/2UJLHD"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-190199-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190199-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d9443c01a7336-1f44c78804dsi57913465ad.61.2024.05.27.01.14.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 01:14:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-190199-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="K/2UJLHD"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-190199-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-190199-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 5F6D528181A for ; Mon, 27 May 2024 08:14:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D88A63FE46; Mon, 27 May 2024 08:14:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="K/2UJLHD" Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) (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 7128D3BBE1 for ; Mon, 27 May 2024 08:14:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716797664; cv=none; b=N0P10PyLqEKLP87GFPSe0nAtLmQtqC3iMryBWY/b4ytcGlxLUsIORdGQgRSUEXlsb/WtvGN/+MNnYqLHAZedenCAg6CT172P2Yy7MbH8zPFZ4YazYZWR3oGxuLBhRcI4P4X6U5yY4CInL+GzQfpTJIu9aJoCtnxnjRfwLj/cZto= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716797664; c=relaxed/simple; bh=nwYaraCxggBDKnVnYzLQQW0XR3XO/+s4UMrvkMG2ZYI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YB9vERkcud0xwkCs7tyD/3cga2+TNA70D+JuiIpFt2+SHhQBQ8yyf3RB3Wh42UOBmq9Eh6U8qWGpvOoz4TWN2IIAHZC2SapfUis+nyxH3SXh/GE/NdXJDIior6RJHiNqZAascbF+TDNXhb8rcFncJeAxwl3LUWsQEqSABoszTEc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=K/2UJLHD; arc=none smtp.client-ip=209.85.208.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ed1-f41.google.com with SMTP id 4fb4d7f45d1cf-5788eaf5366so1709299a12.2 for ; Mon, 27 May 2024 01:14:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716797661; x=1717402461; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=2gOfFJLDZFM1NLZoeu2fRwYilxYpWgEWWcHQQR/WPKs=; b=K/2UJLHDKW68eL9idw8EEEp8naRe7lSMEvpaCj6OZwGtuC561mk3rm0O5xGycLE+8Y GCFq9BSSZ9mN5sjpL/wSz+4aPufi02V5CzFs2Hkh5dHcWKBcdljP+gOW0kLpF11HcE5Z /xgaj11Nqsex5mL36G578m9+HwsrPs78Ejd33tp/H3jwMqtH2D0T0QApD4NqEX1QQHNI z1V+ovtNmJq6yQ8/+O5VOqlGLTUXqUsvmCwfZfxD35Ft+qP3j0LacJR2Qc2AkEW/l0Qc u2WxnpAb+T+izEzRRtB9i2//Y76sXce/+mlcVMxN13BbuSMj4EQCm4Y7jD0HNufmtctp 7QCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716797661; x=1717402461; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2gOfFJLDZFM1NLZoeu2fRwYilxYpWgEWWcHQQR/WPKs=; b=Ozo+4ZJTMV0rRKC3kNmf6R84SgVNxgeeh+CC/Up/113pA3UNs6shs75vKVZgpJVk4j AOB2W+hy9GvHoopxfvxpqPCZ+AA7/HruYFCKyuUYEopilYMx2amWe9nmPpirKAtCJHSe Q3oe0ihjh8MMqNVGvgDE3gkmb0gPg7zbvWl+22zlGK5mUae33rthRCG/OPAidP7aIetP UbTDuiKdkjGKq2+yQtX+VM5GGqkdbrAgpDJpe/kWE6IKQk85ZGJ9Wd6LlkP+SXF2mPT4 MXwAgGT5IrQM+NHtlxE6VPZbJuFvmLoouAWqX1t5MX2AclCb/Co0F9Sn35hGoZ2i2OZF qZSA== X-Forwarded-Encrypted: i=1; AJvYcCXGj/7FlrKCSeEEeMaMxULyfpetPn843EiNEQB1Yy9IlgnuZBLyXjVVYac2mqPbk2mUqzR9QPSX48YV9bthxX5hR6UwUQi9sxfF0a3i X-Gm-Message-State: AOJu0YxG5ySkRk2QshvGxQSJ/IYm9bq9+J+O7q8YvkJPOfR3mc0K4GZd V7RHvFHhQF4L74IP0G/u+FljxdC8L58YwIurUDrJUhkyl8K56T8mpSJZRZ50HvI= X-Received: by 2002:a17:906:7f15:b0:a62:e9c:f621 with SMTP id a640c23a62f3a-a6265148c46mr601649666b.58.1716797660675; Mon, 27 May 2024 01:14:20 -0700 (PDT) Received: from localhost ([102.222.70.76]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a626cc8dcbdsm472629966b.175.2024.05.27.01.14.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 01:14:20 -0700 (PDT) Date: Mon, 27 May 2024 11:14:16 +0300 From: Dan Carpenter To: Andy Shevchenko Cc: oe-kbuild@lists.linux.dev, Yasin Lee , jic23@kernel.org, lkp@intel.com, oe-kbuild-all@lists.linux.dev, lars@metafoo.de, swboyd@chromium.org, nuno.a@analog.com, u.kleine-koenig@pengutronix.de, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, yasin.lee.x@gmail.com Subject: Re: [PATCH] iio:proximity:hx9031as: Add TYHX HX9031AS/HX9023S sensor driver Message-ID: <6f479ca6-cd6d-4a28-8afe-8b74c4d171d4@moroto.mountain> References: <59869d5f-3d97-48a2-8a96-127f7b46c0e8@moroto.mountain> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Sat, May 25, 2024 at 05:00:59PM +0300, Andy Shevchenko wrote: > On Thu, May 23, 2024 at 3:42 PM Dan Carpenter wrote: > > > > 5e5a419c9407f6 Yasin Lee 2024-05-10 1110 static ssize_t hx9031as_raw_data_show(struct file *file, char __user *user_buf, size_t count, loff_t *ppos) > > 5e5a419c9407f6 Yasin Lee 2024-05-10 1111 { > > 5e5a419c9407f6 Yasin Lee 2024-05-10 1112 char buf[BUF_SIZE] = {0}; > > 5e5a419c9407f6 Yasin Lee 2024-05-10 1113 char *p = buf; > > 5e5a419c9407f6 Yasin Lee 2024-05-10 1114 int ii = 0; > > 5e5a419c9407f6 Yasin Lee 2024-05-10 1115 > > 5e5a419c9407f6 Yasin Lee 2024-05-10 1116 hx9031as_sample(); > > 5e5a419c9407f6 Yasin Lee 2024-05-10 1117 for (ii = 0; ii < HX9031AS_CH_NUM; ii++) { > > 5e5a419c9407f6 Yasin Lee 2024-05-10 @1118 p += snprintf(p, PAGE_SIZE, "ch[%d]: DIFF=%-8d, RAW=%-8d, OFFSET=%-8d, BL=%-8d, LP=%-8d\n", > > ^^^^^^^^^ > > > > Also use scnprintf() instead of snprintf() unless you need to check the > > results. > > This is incorrect advice. You should recommend sysfs_emit() / > sysfs_emit_at() in this kind of case. No, this is not sysfs code. It's debugfs. The API is completely different. regards, dan carpenter