Message ID | 20240605180238.2617808-3-joychakr@google.com |
---|---|
State | New |
Headers | show
Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) (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 CA6E314E2E2 for <linux-usb@vger.kernel.org>; Wed, 5 Jun 2024 18:02:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.202 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717610575; cv=none; b=jdo76f3fRHD1Mi8a10jdaBhtzzFyINc5TlT+J1BGqZpZZw89kBYJrN5zdnC902CNPHXNpo4+on4JFPc050ozgtEU6HlVRToGPZKLqFr7/4L3zPSF53z0jrLIRjWJfhUmpT80EmQjODrllKavOSfJOa+5gGwSjrQ9a8p1x3/Su4w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717610575; c=relaxed/simple; bh=3NTGVyytdVyzcHP8txKlFB9YPPGxIJEVxCzu2cUQr1M=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=WyDd2/iVUeMEaJnpsXlxYtKOFZjOEKaANz/jEhOuK6biHnPw+LexIqfu7W/4M2D1n21gRdjxmOhhQQ5wC0CqLADZTE2HhTN4j4ZTYOsvt7ijQSbyGAiR5VSH9KJYYFu6d3YadB+wqjuTzIPRuObNGhvul1w3o/jn1jZNoaYvVGU= 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=Zceh7r4D; arc=none smtp.client-ip=209.85.128.202 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="Zceh7r4D" Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-627eb3fb46cso320777b3.2 for <linux-usb@vger.kernel.org>; Wed, 05 Jun 2024 11:02:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1717610573; x=1718215373; 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=qDI8h7ZoQYy75CqD6I2McYIto2hpIA5emU6fq1I3LPI=; b=Zceh7r4DKjZxj+a9nK/QaXDX6PywKjBJO0UZV1S/xJdKXimp/nnCI0wZvsZf0UJhwK 7Q1RjJdda7ewUbgf1avKIEw/IlHVV0/kuQYnDpbGWhedQ8/BTcIzW73L2EnJUWVZdmg+ PZ9u65qivhbL3++hcgSBbL4DG4bWaaEbCO+dFoE8ACY4vUfP6RaLzkkrbcCyH5XWZISy wDGKnK9ja1EPb9k9WJHVTZJ5qM0WWQfoT1vIvHa7kLuHD+Sqbr7dPNAVmelsUyhgUAwX A2L8gG3AW7S8JXvOWrFgHP2ygYbSqPQRbESNpKB37Y6rSBH6lpRPJcUdj1DyHb9Jg1wz zX0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717610573; x=1718215373; 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=qDI8h7ZoQYy75CqD6I2McYIto2hpIA5emU6fq1I3LPI=; b=ZntTShBz+w/FfTe6IijMFs7+tt9ppvSJFhP/5qvLqmyrqmBTUbkQuw650sENLm6bkT xGDMAa8eVhNiptLiKTBRIMitsUe2P3inErDNpKdDV2vmT+Y/mtVLBXWw61rYYhx7Thm3 jN76nt0y8h2IX1RQolNUU7uq8lpFf84gS/7xOm66gsaX92qfku7DQPb17trAx+muqM7g rs9RNSFiP5NRYhuNPfpeIVhW/rfQFIpBmYvoY+sWsZnaFX10TZvs+PMGlPlXa1yOZrNx CiE1mupKmsLDMTizREZni+2lg/DncEAzJysa5OVBCnAuK0tD3fqQQym8QAFhWFEi/Bhs fJJA== X-Forwarded-Encrypted: i=1; AJvYcCW5KRlJJ03IjzQZZ47Afeps3mJ6Ihlsm4TuP2BT3Qe9GrksSh3o8FYpe2vmJls+OjKZzkAkQNRvo3tUOfwrqW5I35tgTuWMnKvK X-Gm-Message-State: AOJu0YxhbDyPn0eQK7bsuwp7FOXJG+4nAkPEX3oXaQ/BYmsGW+11LSvS JWRxjfUloeXkpa2Tuc3tXCJs21C+bKFA68GsEBYWYn4sbUisHwkChAP6IrEeENXqasYvdyjYZw0 mUDQZff9m6g== X-Google-Smtp-Source: AGHT+IHsHtY+bAgPNOkcmVi64EeRKQimO371NMHALyHppPPqEXYX97pSerbED4x3JFp6tor3148MLJe9OAqS8w== X-Received: from joychakr.c.googlers.com ([fda3:e722:ac3:cc00:4f:4b78:c0a8:6ea]) (user=joychakr job=sendgmr) by 2002:a05:690c:39c:b0:627:96bd:b2b with SMTP id 00721157ae682-62cbb596fc6mr8780427b3.6.1717610573043; Wed, 05 Jun 2024 11:02:53 -0700 (PDT) Date: Wed, 5 Jun 2024 18:02:33 +0000 In-Reply-To: <20240605180238.2617808-1-joychakr@google.com> Precedence: bulk X-Mailing-List: linux-usb@vger.kernel.org List-Id: <linux-usb.vger.kernel.org> List-Subscribe: <mailto:linux-usb+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-usb+unsubscribe@vger.kernel.org> Mime-Version: 1.0 References: <20240605180238.2617808-1-joychakr@google.com> X-Mailer: git-send-email 2.45.1.467.gbab1589fc0-goog Message-ID: <20240605180238.2617808-3-joychakr@google.com> Subject: [PATCH v1 12/17] soc: atmel: sfr: Change nvmem reg_read/write return type From: Joy Chakraborty <joychakr@google.com> To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, Lars-Peter Clausen <lars@metafoo.de>, Sakari Ailus <sakari.ailus@linux.intel.com>, Bingbu Cao <bingbu.cao@intel.com>, Zhihao Cheng <chengzhihao1@huawei.com>, Jerome Brunet <jbrunet@baylibre.com>, Martin Blumenstingl <martin.blumenstingl@googlemail.com> 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 <joychakr@google.com> Content-Type: text/plain; charset="UTF-8" |
Series |
[v1,01/17] hwmon: pmbus: adm1266: Change nvmem reg_read/write return type
|
expand
|
diff --git a/drivers/soc/atmel/sfr.c b/drivers/soc/atmel/sfr.c index cc94ca1b494c..c1c8e59cf6fc 100644 --- a/drivers/soc/atmel/sfr.c +++ b/drivers/soc/atmel/sfr.c @@ -20,13 +20,16 @@ struct atmel_sfr_priv { struct regmap *regmap; }; -static int atmel_sfr_read(void *context, unsigned int offset, - void *buf, size_t bytes) +static ssize_t atmel_sfr_read(void *context, unsigned int offset, + void *buf, size_t bytes) { struct atmel_sfr_priv *priv = context; + int ret; + + ret = regmap_bulk_read(priv->regmap, SFR_SN0 + offset, + buf, bytes / 4); - return regmap_bulk_read(priv->regmap, SFR_SN0 + offset, - buf, bytes / 4); + return ret < 0 ? ret : bytes; } static struct nvmem_config atmel_sfr_nvmem_config = {
Change nvmem read/write function definition return type to ssize_t. Signed-off-by: Joy Chakraborty <joychakr@google.com> --- drivers/soc/atmel/sfr.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)