Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp475690lqr; Wed, 5 Jun 2024 11:14:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU3CPCoE9jJbEUhoHgj9fV869fshPpdiOXcyRIUqq6adVugc+fG8G780PxrAeb8do+EE5AHGRup8H51ZAauYNrkDWucJCNIqUNxcEvj4w== X-Google-Smtp-Source: AGHT+IHvTHVvMxBIR/YLJUxNKW7x/cEDIeUkkWZjraFO2LpKez1TD6TgJi1HogbludESZQiEwICM X-Received: by 2002:a05:6a21:196:b0:1aa:5ca9:c565 with SMTP id adf61e73a8af0-1b2b6e4aab4mr4029514637.8.1717611283595; Wed, 05 Jun 2024 11:14:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717611283; cv=pass; d=google.com; s=arc-20160816; b=G7oAk7NkBmUycFsAKb4AM0RywmNv0+Oy/Aok4y8eRao8X+YYGKFgTu773LtaPzeWAx 7NB9i4b+0LzLSc4AiiZyMzQvINTQ5XfFuSQcMUSuXVRt0aFhCxNyINhsqptKdXUFYhoF xHWtoA/3rnIwzlC0Mh69bz7qa1JM1cAP0aCljDIvPsU72YbeVi3scUqS2OkDS1qGYMQR 4tUq9khMHEGTdxknxfL/6gAPpV6LLw0PzLEG5MAVijtJgNcHagPyo9tmdqy2Aiqm585g c7hTwOWhfrEzXnPOY/0m9REQUg3cuggk2zcYHNX5Bdr/XwfK3UB0dJSPas1sn24RvlQ1 sHag== 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=qvmsbFq1f0xb8qTUeLHIrwaOpt4YNpx3HYdX4+QrPhA=; fh=dSprYtTGcsPzlpK6hd8+FaJIrq3Jm+SJWqDQzvXyfl4=; b=k+BavVzRTZBewM3GE9a7WRRH4DEHgcDZuLfj5dW5bbz1g7xPTR7k9NG+8X6/Ne9lvN 9Mdu7Sv9xVzy2oUtJ3Nv79TxfDC0Q5VwAYcali5cQyyTPBo8ubkIrb2kaRS4a1x9+KKR lUnjbc/uQ2XJPZ6cZkri7BtHPwGMqUSUWM2NlqPt5CGXX9u438A9eyn347cx/Xz+0nsC g8G2Qd9lJ8x704ZaubOW5obuzMVFJF+vQsj0c/IKlpos7QclTZl46P2YytoIjN49ADKD 7C1SeiJXH90CfdJUPhetoMDHLsImoYDllacPiA0egZU17cHlAvcGc8rJxCoIW/EnivqS DpMA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=yNqgUmHy; 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-203007-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203007-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c35c73bfdesi76333a12.713.2024.06.05.11.14.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 11:14:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-203007-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=yNqgUmHy; 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-203007-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203007-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 038DCB21ABF for ; Wed, 5 Jun 2024 18:01:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 884B115F3E5; Wed, 5 Jun 2024 18:00:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="yNqgUmHy" 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 BAE8C154BFA for ; Wed, 5 Jun 2024 18:00:14 +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=1717610416; cv=none; b=F0PTdvAqbnzSzJ3xLxoR0HXC4jN5bsKP1x//JnbIIlaghP1ev7zXEff2AFssX4yPbGC3e+wuU+C+5W/Tv/ugWSjZdjDVN0+LP5bSsi506nXPq9xZP+yhbWcHo2Q/wMg5VWdxJWI8zXIs0+OtM/zQGziQtGUt/+fq1RAu5bj+M4g= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717610416; c=relaxed/simple; bh=fPdJt4Gydxsb6XLYSRdNJ8hD/W3THq9fKXubquLZs6s=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=i6pO2TMpfF9WSxmEgO2OgQMj+dJxB2O9ZPUNseanigLTQlD7BtCocaUnhG3NIxZlrSfBprkFCXYw4oXWpSwDxDW+dNjlwGkinP6gV7VE76oS46/YUkYaxsln0x6hrQ1WF8mMvYy39CpyJZZZ/x0v8Oz9aGL9L9BspHrFDVUYwuc= 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=yNqgUmHy; 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 Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-627f382fb97so232947b3.3 for ; Wed, 05 Jun 2024 11:00:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1717610414; x=1718215214; 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=qvmsbFq1f0xb8qTUeLHIrwaOpt4YNpx3HYdX4+QrPhA=; b=yNqgUmHy2UkDE3heRRb8oMaXmLeLXyM1i27wFJS/QU6flgxbWEI6TZ7da1x1XjqPQO VlQ19oRwmx0Yd/blYB/OvER0B5Y/49RGI6us/PAl60yjXA5+o8wOy5hEfj5ZadolRbK+ XWIHPanx9sQPLs2/5sl8VyvI7v9OkxWCYCvKJqd4BWY60BaRMym9Ck/ROACMI/JPScoo WSekErhgKeJiiUPjrxf3KdbGf6pBiF0a1bGCPfBXHONpv8wSDHUMAThTTzKivKWkB3ub bbsqHW9iPJwiorjZWv1Xw6UL52JrjCEQWpvC3xexXC3j6MNOu7OViZQDgdh4MDbEtTMU WmCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717610414; x=1718215214; 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=qvmsbFq1f0xb8qTUeLHIrwaOpt4YNpx3HYdX4+QrPhA=; b=w/zI1XYtIzoCSoep1agNn0vVXtIV3ygBrRUBjpztzw0sy/38CbwZectaAdxSha1RY6 Dva3H/+1hsW73RAJc2pvGlvSfJbq3aJEWOkIwSVToY1zPa495KwEzj/cWjwUXyXuRuDI 3KSE/5Sl3ytXvO5+pcJJ4ZLHHoGYqexnDy9H9ND1ClTkH/xULdRC5fR6tHCX8NEkBIT7 KhJ+X846iAKrRb41E0tIoWknkVl01qaBWb4LBUvE/i5CRWg19oGnjloERdxiD7fNoCan E48/E0uik2smYpFLjuSOizXqg5i2eehOcyiJ0BKigveBz8vfHVhcweFjUnzN3EL3j/fD GFXA== X-Forwarded-Encrypted: i=1; AJvYcCXYy06jUurjzxHMZgrZIa+9W46i+sn1dLyR1qum8IJbZrNdv+a8lxN2voYaVlmbSOQAgUqVraunoh7s7gdGLYIuKSXovlTYJIIoqhfQ X-Gm-Message-State: AOJu0YxKxJZWznTIUwC9v6YDKa/jR1xO55b/jmb1VvJYU+eIEhnQsg2D /iB32wyLxhwXnFDrAnMCPX7q78EnZcIvXkSleIsuE33v7BJeyFrM+NC+ROzq8q7AvuMd5ND87xD /QroqEKQsPg== X-Received: from joychakr.c.googlers.com ([fda3:e722:ac3:cc00:4f:4b78:c0a8:6ea]) (user=joychakr job=sendgmr) by 2002:a05:690c:6688:b0:622:cd7d:fec4 with SMTP id 00721157ae682-62cbb5e6bc6mr8437267b3.9.1717610413829; Wed, 05 Jun 2024 11:00:13 -0700 (PDT) Date: Wed, 5 Jun 2024 17:59:47 +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-4-joychakr@google.com> Subject: [PATCH v1 03/17] media: i2c: video-i2c: 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/media/i2c/video-i2c.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/video-i2c.c b/drivers/media/i2c/video-i2c.c index 56dbe07a1c99..2bfc221b5104 100644 --- a/drivers/media/i2c/video-i2c.c +++ b/drivers/media/i2c/video-i2c.c @@ -151,12 +151,15 @@ struct video_i2c_chip { int (*hwmon_init)(struct video_i2c_data *data); }; -static int mlx90640_nvram_read(void *priv, unsigned int offset, void *val, - size_t bytes) +static ssize_t mlx90640_nvram_read(void *priv, unsigned int offset, void *val, + size_t bytes) { struct video_i2c_data *data = priv; + int ret; + + ret = regmap_bulk_read(data->regmap, MLX90640_EEPROM_START_ADDR + offset, val, bytes); - return regmap_bulk_read(data->regmap, MLX90640_EEPROM_START_ADDR + offset, val, bytes); + return ret < 0 ? ret : bytes; } static struct nvmem_config mlx90640_nvram_config = { -- 2.45.1.467.gbab1589fc0-goog