From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 50EEDC27C55 for ; Wed, 5 Jun 2024 19:02:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:From:Subject:Message-ID: References:Mime-Version:In-Reply-To:Date:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=bAnNJsRvJIHgq+8vMo8cqPurTlGPKSu2RQDxqG8mbKk=; b=2YIkQgnytNudomxvFqp5a8A9GA r1rvBYM4uuKl4RW2KOjlJgZvfvPSY33hWBYAOB+DWX8iD17ImKRVWGAwW3qPwbvz3OT7ND2PFWO5e ByGWnqFQV5obv4jxscG1hwN4sBbsumbO8qzWP3PrODm/qvqaHsovDfxAKMkYQZ1p7teZhzGXqd6tY FQ8KeMELFSk5zviiztBeC/aAtHHOqxSn7sqxVzdeXgMhvHYuwE4VpTcqTE3x6aVpij8yuUk2CBVLe r78jXNDdorQqgmAtwnUgooc6uiyhlhFuSBOKlb0L+bGjQob9apTUSSIh1OvD9uBnf+3dEchBCYtux gy2WbiMQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sEvtW-00000007FYf-2ovx; Wed, 05 Jun 2024 19:01:58 +0000 Received: from mail-yw1-x114a.google.com ([2607:f8b0:4864:20::114a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sEuw2-000000073Mm-3HFM for linux-arm-kernel@lists.infradead.org; Wed, 05 Jun 2024 18:00:36 +0000 Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-62a1e9807c0so741917b3.0 for ; Wed, 05 Jun 2024 11:00:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1717610426; x=1718215226; darn=lists.infradead.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=Kq8gN9PC4V0/WUeYJD+ngNL2/82oznUqnDRsVCEUyhc=; b=eHoQbCRQWdzbk7jqAn75VRv068J3wp+Cl8xeWBjZ18byVpf9+X4lgl0/CMmIrR/Gzv GoJl66vo4YXkPAJ9xRm0DFLd8XcY3R8EihQo+kYvUafcWsKPJSlcwt08gXi5dPcTDAq9 NRKcsgt4PLDOqfXZqZMjvR/8a9xUQmbykuPQAF7YNBjfI7U9rWywpho1DjlVS7FZMBrK rk1YUhXEFqyCM6sYe3RTlWixUA2WUeOzvYTfDRCeY7lLtbahDuSTuKs8xoDPIY2A3rmF RPzOmWkhjG//s97r5GdU/FzAUQkncWD+GH6nfdN+YYe2xs/3ew6I1/WcUTJyUHPE0wCQ ysYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717610426; x=1718215226; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Kq8gN9PC4V0/WUeYJD+ngNL2/82oznUqnDRsVCEUyhc=; b=PaIcd4Uifk3bL+ogiJRwuepu85DjN2J2o4DDQPc/quGdqsBiGPcrJnlGs/xLvsfV7V so6GZcQnQ2XuEzgn1hfYDgIrGvBFZB8TVWSH6Dz8jd6SZ5habTm0zXPS+w8TA/o6WvCC zN62C4xCEwehtHNCc2+8zjhvIajBR32McizxgtrBZjqMO9gbuPX6QRMNj5aezCK9j1G1 Ir9l6f13OkxpT73sXDmoatL5JvrFLxUMAGxyXPqPc49kRyvzjb46YWwNdDhEqB4EfgAN Q0JXj5xdxLVuJN45u4VZfNjKCgOO/ZrloeVuPbHL+5A2a+TxdPFVhIM97FfSBNuV7D5e sYpw== X-Forwarded-Encrypted: i=1; AJvYcCVhj7zSaOHhiorDe0Xky/XTsfU0o/iOSDPy5Rf6t4l/Rl4gKpJ6Cs5S6oxTr7j9SecD4OBHzNK03zlgwlB5H3SjT43Y3yoL1QV9euHjuJwRSUblw8Q= X-Gm-Message-State: AOJu0YzVnH2ElsfYWNAp4lODHWsnHfKr619EVApDlGNBKWpjCLjPtimh y+gIiYVrFleDR1mxIkq1UxWo6ixd2tD/Wqn2Z87u7mFILh15BWJCQtTufOe/xsYK22N3ewonU/X vV4BTCuGqdA== X-Google-Smtp-Source: AGHT+IGpQQ4ibO82CB++j7EQg4rT4P/RHw0r35tzLXXxO3B/dL6yEQW14Z2L0s1fkq9sPWcVhlzFxs8YqockaA== X-Received: from joychakr.c.googlers.com ([fda3:e722:ac3:cc00:4f:4b78:c0a8:6ea]) (user=joychakr job=sendgmr) by 2002:a0d:d4ca:0:b0:623:be6:d5e4 with SMTP id 00721157ae682-62cc71784bdmr605497b3.4.1717610426639; Wed, 05 Jun 2024 11:00:26 -0700 (PDT) Date: Wed, 5 Jun 2024 17:59:50 +0000 In-Reply-To: <20240605175953.2613260-1-joychakr@google.com> Mime-Version: 1.0 References: <20240605175953.2613260-1-joychakr@google.com> X-Mailer: git-send-email 2.45.1.467.gbab1589fc0-goog Message-ID: <20240605175953.2613260-7-joychakr@google.com> Subject: [PATCH v1 06/17] misc: eeprom: at24: Change nvmem reg_read/write return type From: Joy Chakraborty To: Srinivas Kandagatla , Greg Kroah-Hartman , AngeloGioacchino Del Regno , Lars-Peter Clausen , Sakari Ailus , Bingbu Cao , Zhihao Cheng , Jerome Brunet , Martin Blumenstingl Cc: 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, Joy Chakraborty X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240605_110031_773537_158A13DE X-CRM114-Status: GOOD ( 11.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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; } -static int at24_write(void *priv, unsigned int off, void *val, size_t count) +static ssize_t at24_write(void *priv, unsigned int off, void *val, size_t count) { + size_t bytes_written = count; struct at24_data *at24; struct device *dev; char *buf = val; @@ -509,7 +511,7 @@ static int at24_write(void *priv, unsigned int off, void *val, size_t count) pm_runtime_put(dev); - return 0; + return bytes_written; } static int at24_make_dummy_client(struct at24_data *at24, unsigned int index, -- 2.45.1.467.gbab1589fc0-goog _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel