Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp468964lqr; Wed, 5 Jun 2024 11:03:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWyLmWpzLQ1AWzVfjsc7vS8bJeWEgp1mdAEPrUlWBs3O2/96Kh9BlK1ZA+SrYcSY4GoIb02+iM8KAWygSUErRYUjeGaCOE36ZeVw6dqfQ== X-Google-Smtp-Source: AGHT+IE7L1HcGWfV4FTULMjdgJ2mfv8onmKfobYEAxv8gHKRr9TRVYoK1a4tRxH82ehCh4U9y3os X-Received: by 2002:a05:6870:420f:b0:24f:f23e:dd50 with SMTP id 586e51a60fabf-251220b1031mr3730535fac.57.1717610633761; Wed, 05 Jun 2024 11:03:53 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717610633; cv=pass; d=google.com; s=arc-20160816; b=ujOTZRizD8ZsbfKRXOj8jAXh4xzHxwLgRYdIjvz5/qhmj3zbLsz0MZYoY1EAe2+SwO luTk9KUYjoo6y+7HdD+w3YLSvYB55MjOLvnTtomM1z3Rn7SUymSLADntJwx5gzejt9XT Bg6fefN2AmpDVTUNcpcSubR9xnbt6lvuvp2xn1TPcnV8wFL42pO/Ub/X+G57A/lcjKHR 0YeAd4D4mAxBUMU71MQqzYIsmjSA7ep0Ovk7bjrhqcKI0YZOhlmqnYA+J+FYaF2Bef1j dlTU6o6rgnXbk8Dpmojqqz2yfzwTWyVz3vv3DPMvt0xBp2wz9IjsSynwtCUNnByfVkh/ nrJw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:references:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:in-reply-to:date :dkim-signature; bh=Kq8gN9PC4V0/WUeYJD+ngNL2/82oznUqnDRsVCEUyhc=; fh=Qu5IbSbbT8ZkmOLXsYAMEyslQI5hiKd80SDM7nOBkqI=; b=z1Rh/WBYkGDuo+j7H9sSYqsNp32RHJibTUH0x/QLkl2E64wCmbYvFaZozDJynGQmw7 a5/tH5o8VUPWY+k4Jb60we0J3mZKPVJEZm7hHl+WlzU3btAlOVuqOfcy51WQQxMlj1wa EHF8vGoiC1XSNqficH3royF6qCy7gt+xv53xCs6+NwOx2GaiuK1ZC4qL41YNT1z+S01D 6RTKM/APjnrzLsSFYOjvbBPDaw2eV44M6rd+WWHHbY8FIFAHKYcv7VmPyHJmoa9dYSWW nJrfE5QBg5y2Wwct76qAPunuSUgtGLykj9Yn+nDQHDGMqoHGbCmZvkt3jLKTZW2Rxngr jFAQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=yW9iJgkc; arc=pass (i=1 spf=pass spfdomain=flex--joychakr.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-203011-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203011-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 71dfb90a1353d-4eafef6b060si2271087e0c.266.2024.06.05.11.03.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 11:03:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-203011-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=yW9iJgkc; arc=pass (i=1 spf=pass spfdomain=flex--joychakr.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-203011-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203011-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 477B91C221D9 for ; Wed, 5 Jun 2024 18:02:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 47E75195B22; Wed, 5 Jun 2024 18:00:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="yW9iJgkc" Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) (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 73C0F19598F for ; Wed, 5 Jun 2024 18:00:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717610429; cv=none; b=OjdpVaV3XWDlN0fhLHNz3ISUkLEKH8KJQmnUijz/bqH9+U0ZS13cnrEGxTgz8QqOw9jf7PA7k97tSKuQzs0gk0hB8RSPp0lOSJMGM8rI4PyY5i77grYGdYw6e3jUBuGtabdDsV2X/XSSGDQdoO1OcnxGuDy22dMTziReWBb8rlQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717610429; c=relaxed/simple; bh=7s5ualCvDc0GEz4419Gj42eDU6iSkCy4DM1JO8Cp5kE=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=jWCmCwUDkhczltxNvHBb2DeKZ/YdtWamGJitVPZyhWw0WTvOuQTsn1yuUKNzQmEJr1by9i6Op9sdXbu2pmkYe33D9gKUvlTqzkcK7GY53qMkummcp7qdIo5/YOkwl12wPFucPM5Pm9POI9O+8/X0HjShYoIzDXYNYiL8MXL8mhw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--joychakr.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=yW9iJgkc; arc=none smtp.client-ip=209.85.128.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--joychakr.bounces.google.com Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-62a088faef7so15617497b3.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=vger.kernel.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=yW9iJgkcljzKSnVxoazsYECi5fP6QNHHLJ9IlEuTsYQL+RlaWWDmJD2d4e+DNhDTlm KIfryHEvd7FtNm8eHNyqjTI1XXd9/8uhvtg7pv/6kGvV3N26EfwVy000lhOWFWeeOYca tJ5tYDQzM0o210kyrr+IgjNfC2CA3bJ/iL77N6LlXzTEq98PU3R3wL/25tRG7uPbotgU cpbVNwzhr6IKc2fqP3RBBaMQHVM8jgX0F5gRXjSonWVCOuoyDtvr1Rlg6q+Zn0PJq947 LFpzYOwiH3TGEwZZHterdbmrVBOoTZV4ppyVHdrpANxTOrfCSPzqLu+DJ+cBDsXOimAK gLiw== 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=qKoa/waiDQ2r9TV82osKkUxxjeH/L14bjsaiLxtcz00P0f0zbZEmpYxSExfHldkPPw SE0kZCyc6nVzckJ98n2XUh5yT+oc/6G3SnTxUNJAJipU168ScgWJl3KC7lwLdLOyk2Ur 3DhMX20jK2LniWoanYsUjDcXr2Y1uHztDtexD1Gop2SezhFOeSZnnKw/xttN6k/DUXBT ovbuglMeTRR8BbKz4KoTWm5mSNtuqKwMraqy8pKtLThCMaQU8iF1SWvOW3iykt3CUyUT AlF4bky/D2evg9yd/Zst1chHcox6fObzn6W7uJTe793y0G2Ro1dTpstFfUW0+N5m8BWr qACg== X-Forwarded-Encrypted: i=1; AJvYcCU8ZQ0IA+E7rzSoz3Qk5FLiIGN2AieHRlqwFeSg6W4O3bmCjtCyuKpMt8UW15UiF8cStVc2gtYMmot6LdyphG10tpqc2Q6rlMuLxg76 X-Gm-Message-State: AOJu0YyFCAmS4aXTz+Kb6KRGmaEqzsg2O7WotxTHRAK+UYHjt+5yOEjI 2B8iRPiEOrC68Dty22PtTMc/bGbPrafJwprmI/gaoVqk6KPCaVW4He/wJG3Afd1OtOpmnOm3Klq Yk4FDmkUyxg== 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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 Content-Type: text/plain; charset="UTF-8" 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