Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp272601lqt; Thu, 6 Jun 2024 03:13:11 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVeYsKauUgsaRCcAeUfPrY/q1e/9lLU8fC+yHes71aEHHb3anXz09GkhpCcyae/rZJDFNrKZo6rtmBkvHgS4mU5PQgKhGWnWLp6a4EX7Q== X-Google-Smtp-Source: AGHT+IGxaVGShLjHoLX0sZqSXXQRPcBV/hHP2jvbITXXfNCBJyRc5uKDVO4yRfOkGku4JM8n5uJv X-Received: by 2002:a05:6e02:1788:b0:373:8b80:eb41 with SMTP id e9e14a558f8ab-374b1ee6e62mr58453915ab.1.1717668791664; Thu, 06 Jun 2024 03:13:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717668791; cv=pass; d=google.com; s=arc-20160816; b=HlCGmYX37uMyFn5Jh0K7PqwQTBUbWfSe0elm6GfMLP6mkLRVYOUCfvk7SO/7i1J6Qs vgtQYwq36x0/t0zKCKtl+VI+r833I+G7cwy7k1kuhMf1gb3cf8n3z1K6aWuVgCi5zO3U 4wT0sMYBO6IaecHrIaDbm8YYAtJZQU9O8zVEnMZBkUPzNZJRh0wvtuiWO57rzhF620H0 tO/CJhD/Y5j6cfoW9Rq8ZFRID2WB7Wj+jPYlZunodWTl6ICYZMeCIhMbHeSwRHR9qz/v XIYCpwETQkdWBIrOzx96ZLDWHb9XTLAFMT38KuUOcjMgXuRpmbA16a0yOUPCWGRUbcFZ ik/g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=NYT9tVkTJ0UAXf8TGzWVnjnavb5dtCMnGfW04T5qoh8=; fh=Orw4uJpMywecWr++N5/wDIQfRzeY4PDnDBmkQuZT3DU=; b=F9729Wl9fow2nVSq0rAVkSPJg+3m9SGDHv3IBG00MiZXMsT7GwsuzA5etlhGYzc6H6 2pWrCrwGDMf7FfdfVNN8vuGUSJd6u09Fz9Uzxd2evx03D/sRYrtJtps6o7nn0Y9q5/tM 1YRVy0n3m5Mp1SSJngMv7MFCzPSzpbA9H/9cjDs86btPR4y4NaLNZUYuwgnAoswh5QAp bhB5EVOi+CovxV84lqkkEN/4hHEop36Q8l+DYuzSv9Kyhgc6ixEaG1TvT/Vv3xc+t1Qt nzR6nlfe3FKv1bzAPEbC1dKWxx+4xyRFp+Da5vmV00tSacMx8BT0H8jL8kB3KkALUFqY vwDQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QwJZ635G; 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-204088-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204088-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 41be03b00d2f7-6de20831a8esi941064a12.18.2024.06.06.03.13.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 03:13:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204088-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=QwJZ635G; 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-204088-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204088-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 0F77A283A8E for ; Thu, 6 Jun 2024 10:13:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2EF8B1922EF; Thu, 6 Jun 2024 10:12:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="QwJZ635G" Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (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 7E9DD19068F for ; Thu, 6 Jun 2024 10:12:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717668774; cv=none; b=pjRZ2WwBrRpJOtVbx2BEPONZKhhYCaWctYizsQM3KyEaTWgi0563t6ks44olI1e7Q8VXtem8jjQ+iWaKGO0R4wlkxBmdO6CJD7SsbVPuhLGswKy2PWrrNIJewleeRXtrHHrCgg55/BuYzsFhZCBJjtyxtEqvLpOdiD6MGjgaRBY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717668774; c=relaxed/simple; bh=FpruvuPD/Bh18bogFae9RpIep/NtvqwBxSmz4eQZHgE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TZjRrTowM6hyG144vsSLNJ55vAbAoZzMdqj28WNPLlhVUkYEdtH+5H5AN5atWgPpK4J7zF46mPVQNf8HwCzLMHItw4zUtpMKk4WkwS1lcDjiNBdukM+LkL7kwL6pKPG3EnIQ0Y/OJZlLPPkqG1WeitOId/ZB5kq34o3ufVG8XDs= 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=QwJZ635G; arc=none smtp.client-ip=209.85.218.51 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-ej1-f51.google.com with SMTP id a640c23a62f3a-a692130eb19so75625366b.2 for ; Thu, 06 Jun 2024 03:12:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717668771; x=1718273571; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=NYT9tVkTJ0UAXf8TGzWVnjnavb5dtCMnGfW04T5qoh8=; b=QwJZ635GQ9/JZnsucRnpXGmSllsRSat1CcuUKNpzGbWEpAmS++/+Ubf5dzu+Scrlry cWw4QtPU5BEyMSWokwbk3R7srtoBk78YlCTtLKxS69g7Ou4r4sj4Sxf+NVu741I88OVw CRtCl041XMZk4UzozeSgUyIbrf4ADb/gB45Aqe5GMwVS0QZRa3ixu3SpHwP+L99FGdGu o9ZUuU6t1nz+60ihdQBej7j+UvSykK2ZdnOTNRFYZR0a2FwckmXjoCYBrO7J2o1LKFxK 43JKAB2Nji/OV5nM68oJkASDZEwQ8bzdTO0K/W3Fa8Gk1RJ84oC+OEgl/3b9Bk3hwYzu gURA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717668771; x=1718273571; h=in-reply-to: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=NYT9tVkTJ0UAXf8TGzWVnjnavb5dtCMnGfW04T5qoh8=; b=lzs16KwIdgQ8+bVK6n1+yJ7e8LG5RPnBrkOpjyCXnW7YWF8yu1RbHiHcphVwzvk/22 n6RrTBcrzGaFhkemjzCFH96a2J9QBcFmEWNNaF8mcj0zPCT+MQSOx/MAVJoo5m7VjS+q l4czt+Vw/rfmBx0OmZaYF+ynNn4UdDPznd33KOAS99XSyCFJyXhgEopn9kJyOmO3OuZV gUYCt7bmC2EJ8WJIS/juqUKDK3GHfeT1kfUQ6pGK///zFysYyAdghSTIoGqaMZjKJeLB aooUf9EgWfH8hosa2bEqdI4OolJ2E5bIPvoCmJKYKAdRny/YgP3Y2FR2QoFt3WY46iwE 8r0w== X-Forwarded-Encrypted: i=1; AJvYcCUbgZ44YjgNyqLpkecPo48ZbFpb5ArOxxLBXKXfqoKqEoXZjVMIyKD9rkI9u2tgHxhwIsg2sRE7ER7bkC31Kp76L60s1m405CIJ+TCT X-Gm-Message-State: AOJu0YzwHxqJVqdFO/MboDHtYUSlh6EXJgNnDFmOGmMtRRaIlKTSYkRR J7qCXTOT9a3KCm7AjzXfBvCwQ4Cw1bYvXXOc9+kt7RFXlMTdVZ3NEHTi++Sz3/s= X-Received: by 2002:a17:906:38d1:b0:a5a:1562:518c with SMTP id a640c23a62f3a-a69a02363f3mr311414866b.48.1717668770651; Thu, 06 Jun 2024 03:12:50 -0700 (PDT) Received: from localhost ([102.222.70.76]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6c8070e82esm74598366b.161.2024.06.06.03.12.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 03:12:50 -0700 (PDT) Date: Thu, 6 Jun 2024 13:12:46 +0300 From: Dan Carpenter To: Joy Chakraborty Cc: Srinivas Kandagatla , Greg Kroah-Hartman , AngeloGioacchino Del Regno , Lars-Peter Clausen , Sakari Ailus , Bingbu Cao , Zhihao Cheng , Jerome Brunet , Martin Blumenstingl , linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org, linux-media@vger.kernel.org, linux-i2c@vger.kernel.org, linux-gpio@vger.kernel.org, linux-mtd@lists.infradead.org, linux-rtc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org, linux-usb@vger.kernel.org, manugautam@google.com Subject: Re: [PATCH v1 06/17] misc: eeprom: at24: Change nvmem reg_read/write return type Message-ID: References: <20240605175953.2613260-1-joychakr@google.com> <20240605175953.2613260-7-joychakr@google.com> 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-Disposition: inline In-Reply-To: <20240605175953.2613260-7-joychakr@google.com> On Wed, Jun 05, 2024 at 05:59:50PM +0000, Joy Chakraborty wrote: > Change nvmem read/write function definition return type to ssize_t. > > Signed-off-by: Joy Chakraborty > --- > drivers/misc/eeprom/at24.c | 10 ++++++---- > 1 file changed, 6 insertions(+), 4 deletions(-) > > diff --git a/drivers/misc/eeprom/at24.c b/drivers/misc/eeprom/at24.c > index 4bd4f32bcdab..0e8d92d6ab1e 100644 > --- a/drivers/misc/eeprom/at24.c > +++ b/drivers/misc/eeprom/at24.c > @@ -424,8 +424,9 @@ static ssize_t at24_regmap_write(struct at24_data *at24, const char *buf, > return -ETIMEDOUT; > } > > -static int at24_read(void *priv, unsigned int off, void *val, size_t count) > +static ssize_t at24_read(void *priv, unsigned int off, void *val, size_t count) > { > + size_t bytes_read = count; > struct at24_data *at24; > struct device *dev; > char *buf = val; > @@ -465,11 +466,12 @@ static int at24_read(void *priv, unsigned int off, void *val, size_t count) > if (unlikely(at24->read_post)) > at24->read_post(off, buf, i); > > - return 0; > + return bytes_read; > } This is called like: 574 ret = at24_read(at24, 2, &val, 1); 575 if (ret || val != 11) 576 return; So this breaks the driver. regards, dan carpenter