From patchwork Wed Jun 5 17:59:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joy Chakraborty X-Patchwork-Id: 801927 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 BDB2E168A9 for ; Wed, 5 Jun 2024 18:00:39 +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=1717610441; cv=none; b=PsqCCxpa6ciJr1cxBzTBrsryZPu2E9IcutUGtX1R9TykE/zv5ZDnxV6aCuUAds5D8obW0ndjDC07Ay9GMQk0hHzaxWZtP2D67XvZeRt+NMIX5BlK62gs/z8M1vGBKL9FPJnWU/Fk8VYuPH1E1QxgJ9+UISz3FGi2/+0cPrx4bJc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717610441; c=relaxed/simple; bh=W5M28gmX2P2bsv2kzALbrb00qFmArQmOjGRUC+k0KS4=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=JWaL5QkNFqqr396Yxj4oznsIy4y8Rwytqup0BoERT2lGhd94WgJAGMDf4nrCk/hFH8rwPUlRV1M7i0+8wm+xyX/BtaBaEYndDirvELPU7vQjtBj+kGINxfD2oDotpvPMfCG+zn3kUOmezlW/VDn7iCfuYBZIgQtM30QE3N0nVpo= 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=BoWahOKK; 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="BoWahOKK" Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-62a08273919so324407b3.1 for ; Wed, 05 Jun 2024 11:00:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1717610439; x=1718215239; 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=+5/Bg969zZ0eVFu5myprHh5fQqxMXbek8nDgGOBzWoA=; b=BoWahOKKkJ1D7kfGtrnP0cUxpIrNaZ2suLddLewzR2oz4u7CWziBpzwFHQ+ftzncIs eFtpB/1H9zyQlzicoMJtoEWPK3DPjQzpefAzkEwD6qaiDFV3B0gWZlDhSKPFv0kyzLES mK3VwWf9UebiINpOs4Y5YKaafb1YFVHMwQk3QrRe8v5CIiNxI1jeF5dttXUDVWoM7CnG Marjrxai/k2CObkQx8B/L/3vNKpz1bxj4bvREXGRI3sEGkj1WJCLGHIzNySao6ORHqDb qzF5yPhaXQSrvk1jdn3p9DrUhYQfLvZ2MNZglt0siqP5RZkjDQWbJGwgpmIA/iYYcKMP XYxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717610439; x=1718215239; 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=+5/Bg969zZ0eVFu5myprHh5fQqxMXbek8nDgGOBzWoA=; b=Rc0u4cXghnkK4TBSqOGKNH4m/x9GKiOYdBlA7S8ciPwb2Sp5wpzEzthlVclQwXckvu LiuPEIZZOUqqhDQdPpkBksaFzzS0rliOvZeuXKjUjCRqEo5JNbXR322DB+8taLqhPD4a cUdKlz+gWKzrAL8jERDZeSZS8J8la64mX3i/4dg1VnNRjfSiri5WKIK3FdzSeHUGb1ku LY/Dvmd+Bw1SmnlZegbPsIuZnMnZokYa+mIu08d7Uim50ZaYLBSU5WOmut+cb03qWOH9 66JdgI6LuBa3vbhwnaQm8JXLme8OuEnkbRBY3dNtBQuk0zQSiZ+w3c9eaSW29kPz0V0p cpNA== X-Forwarded-Encrypted: i=1; AJvYcCVDdP/0eGIzDbBqBYorCWxDtiRW4eXiq5MO2daD3uCBswDuaEK7oKo2WqRRKYbtCt+YZ0T03YpZpoggfV8CJ9CLZW/AbmHCeIwx X-Gm-Message-State: AOJu0Yx/6MFA5aGG/OevJ0iOS9/0ybVTCk1pvphbndEYt6z86S5SNEki lbfOq9gAZNp02G2HUh/hXTwYg1Xv/L0UGwtrZyaOJBKeJ7GupmBwKGxJARP7SLO4S5uO5W2wg2R W8RYVh4hIHQ== X-Google-Smtp-Source: AGHT+IFfzGEzBdG0mJIzkY83NzFi7HVUzu/maRQ4zPj2TdB+TSZFtwNCtZCm0+GEQSlNaviP1mxKnEiXfVn+VQ== X-Received: from joychakr.c.googlers.com ([fda3:e722:ac3:cc00:4f:4b78:c0a8:6ea]) (user=joychakr job=sendgmr) by 2002:a05:690c:d90:b0:62c:efc:38b7 with SMTP id 00721157ae682-62cbb4a22a0mr7561267b3.1.1717610438615; Wed, 05 Jun 2024 11:00:38 -0700 (PDT) Date: Wed, 5 Jun 2024 17:59:53 +0000 In-Reply-To: <20240605175953.2613260-1-joychakr@google.com> Precedence: bulk X-Mailing-List: linux-usb@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-10-joychakr@google.com> Subject: [PATCH v1 09/17] misc: mchp_pci1xxxx: 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 Change nvmem read/write function definition return type to ssize_t. Signed-off-by: Joy Chakraborty --- .../misc/mchp_pci1xxxx/mchp_pci1xxxx_otpe2p.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_otpe2p.c b/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_otpe2p.c index 16695cb5e69c..817382c342d3 100644 --- a/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_otpe2p.c +++ b/drivers/misc/mchp_pci1xxxx/mchp_pci1xxxx_otpe2p.c @@ -117,8 +117,8 @@ static bool is_eeprom_responsive(struct pci1xxxx_otp_eeprom_device *priv) return true; } -static int pci1xxxx_eeprom_read(void *priv_t, unsigned int off, - void *buf_t, size_t count) +static ssize_t pci1xxxx_eeprom_read(void *priv_t, unsigned int off, + void *buf_t, size_t count) { struct pci1xxxx_otp_eeprom_device *priv = priv_t; void __iomem *rb = priv->reg_base; @@ -159,8 +159,8 @@ static int pci1xxxx_eeprom_read(void *priv_t, unsigned int off, return ret; } -static int pci1xxxx_eeprom_write(void *priv_t, unsigned int off, - void *value_t, size_t count) +static ssize_t pci1xxxx_eeprom_write(void *priv_t, unsigned int off, + void *value_t, size_t count) { struct pci1xxxx_otp_eeprom_device *priv = priv_t; void __iomem *rb = priv->reg_base; @@ -214,8 +214,8 @@ static void otp_device_set_address(struct pci1xxxx_otp_eeprom_device *priv, writew(hi, priv->reg_base + MMAP_OTP_OFFSET(OTP_ADDR_HIGH_OFFSET)); } -static int pci1xxxx_otp_read(void *priv_t, unsigned int off, - void *buf_t, size_t count) +static ssize_t pci1xxxx_otp_read(void *priv_t, unsigned int off, + void *buf_t, size_t count) { struct pci1xxxx_otp_eeprom_device *priv = priv_t; void __iomem *rb = priv->reg_base; @@ -264,8 +264,8 @@ static int pci1xxxx_otp_read(void *priv_t, unsigned int off, return ret; } -static int pci1xxxx_otp_write(void *priv_t, unsigned int off, - void *value_t, size_t count) +static ssize_t pci1xxxx_otp_write(void *priv_t, unsigned int off, + void *value_t, size_t count) { struct pci1xxxx_otp_eeprom_device *priv = priv_t; void __iomem *rb = priv->reg_base;