Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp467107lqr; Wed, 5 Jun 2024 11:01:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUCeswtWbHWvk1yeIf4ONLHYuYZiutNjt4jhCr3vY9dwa/eFExqqmqioGCXunPHHnOu/b1fBGM1ODYhS3L3LABuKsBfBqI3B8cCc1EJXw== X-Google-Smtp-Source: AGHT+IE3lm9r+syP31B8WKJmfJpcN4vSu9j6YnLiAx4QCllfLdHsbUl8C24m7H55DvJWmr3KJVg4 X-Received: by 2002:a92:cda4:0:b0:374:a330:584b with SMTP id e9e14a558f8ab-374b1ee3e80mr37042985ab.2.1717610487044; Wed, 05 Jun 2024 11:01:27 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717610487; cv=pass; d=google.com; s=arc-20160816; b=XYuT7PAuIxJdjoDdE07VTREIyHfW4j/u/jCwkP7INQ3TAeOXfuk/Z6DGjB7eTzYE4P fhVGpMhpGkQvnA5Zsy/RqZ5PTlHUpz0tTe+yUFlBMc5HNhwMK2xVOS6NORzJLiLIEUXG BLqUdHkxvEDN8lS3LyoPW0VLXb6l+/gM8Z9ZipFL9iSDR4e3O3CO3S443is1kRNlRjsf +3gOAfezKH7ckQCADA6+5N0W5uvsKsPzzAbTGfh9q2CodRin8rPXVbe5nMZ/cvjNhmup YCMnFmOEqL0ek25dGTEGWpwLiUhHdNl88c/Kz3U6PDUPbPc7SvvYJIzVYK+IwREmDanY AtZQ== 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=fOg+UnJ80V7MsfirTppZcqaQfW4UzyZaf6xSdj4zJek=; fh=KPTHrKQqrkmoQF31phKGKWUlnhatRYzzHeiKkvjq7aY=; b=qJCX6jXm1WrdnGNZeMnwZxguOqVt4qhngWnMSgb73Wq6jCJ2EnKse9s1Nola+6Yuxz nvBmfSt86Ls/cSW1VEDiqTBhJfNkADQ0SCNABHYPIlA4ZLdCcY53ve6qJrLQAPCOsB5p cM25+CnEpAWQ/Zg+sD9d80ghc/K4jbPUSviSIlUHJKinI4x9RJmVpgInepPjqCHGJket UD4QF0+8nigfN0nk0PPBi6KnLrKkE1B6OBfwb3PxHq4AJ9598tEQdH+4FJXjq5zHAfXt 50Q9ikVDLwWzdlwqVtzqpKcsjbj/xt3BHeAxZI//fOqDoXC0mBW4/9v0fNXYeg4a9/O0 KQQg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=pfblUWIw; 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-203006-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203006-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 af79cd13be357-7952dbfcef7si62444385a.131.2024.06.05.11.01.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 11:01:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-203006-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=pfblUWIw; 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-203006-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203006-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 9D75E1C21B6D for ; Wed, 5 Jun 2024 18:01:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 728B415278B; Wed, 5 Jun 2024 18:00:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="pfblUWIw" 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 57FC314F124 for ; Wed, 5 Jun 2024 18:00:10 +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=1717610413; cv=none; b=ZkBcDjBHW+BgpIHoP9fGSfh84scHve8UG+SQT5duPzmHF6hYXvEDJ903rmoJOapiknT9TDehk1b2bTXpnO2gptozmqOmpS49mmlgWcuIOOqRjVTEP1Fe0JwRh8eS2Pj1YCo1jpUSPx/ta6gNn+fEUZHV9xM7ijdErr1PAUkHcSM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717610413; c=relaxed/simple; bh=8DJQonJqq5Z4yQRN/sDPNHSxx9pC4pBa8VVN/l35RYU=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=uNxNt6YYV/beYB2nqXk2sS5Re9tuNjZ2h1k7S17Lnmp0HvSdJkmQwtu1IQf1RH3sV013EBMS92YUeu/yw+lnwD9QcB49hH6XtmOKKtO4VQmvSQUPbSarodIbrSnRxuMw37TlOluXQ9fJwtfEbmqnHdkYqIoSoWun+fnIiK5GDHI= 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=pfblUWIw; 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-627e6fe0303so278437b3.2 for ; Wed, 05 Jun 2024 11:00:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1717610409; x=1718215209; 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=fOg+UnJ80V7MsfirTppZcqaQfW4UzyZaf6xSdj4zJek=; b=pfblUWIw3blD8wOp8WE8gt5Jq65lZWQ22oCeXFtUbZiptDqJ6zCGgQUbQ2cMmjfzOR YVY9lArA0jnY76ycsaDtnO0iySMxqBGUbKPwgSWLfmMjWDRqCqa3D4FivtdXwR2W2/rA PSMm2ZF1GAOgMvv4+jSZpC37R0p+9VLq5xjajPi9vrxJ/OSKjc7CmguroB+GyCDanVKd z/R4xPxhbGR6jwsUIC1ZIlDHMi9vBxK5m72lvAMghxlet3dTv2t6Ool24D5MKrdks4LC Wylen1dVC4VFLkiJdOno6Gy+Tt2EIltv91lvc+7T5XSjAT91a4fUKLkQJNYRn0GggObz T0Fw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717610409; x=1718215209; 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=fOg+UnJ80V7MsfirTppZcqaQfW4UzyZaf6xSdj4zJek=; b=Y5yR9cwqFP3kqWsK85Lcst7C6q+EOeP5CGL5nVAfujdU0bKcZhZu74FogK2WLMlYgH P9E3myJ/r0X0J4KpIJ3bC6TBBb8au/dcOjA7NzA3qWreVVDosHZGyP+BgFKy8Jy3D6gP 5kwPlMAsVRtcerMlIqrR0gaZVTMuV1aDI7imyA8yCWde+mzR6n5Es5AVZ7RG9BHSQk0S ZeYGwUNMS6Jh9ISrKuWkV/cuca6OcQfuRD4oq0ce/Z3Y9qNEYzB3Yim4KsAaZUzwUKeB bYgBsZAegGH2hh5BdfzG56raaT3RJtyQvdEyFZwho8i/kxI0rygPsL5XxLtHK5hG1b8z w8RA== X-Forwarded-Encrypted: i=1; AJvYcCXUNOePgEtPfSktJUKiamGpz/QVz3YZZb7h+wc2y2FXcBCxed1SHak23SoGmHUG2j6TMSvzx6CF1wkwyWvsD9Muuvwr1lbDpHDmLR8F X-Gm-Message-State: AOJu0Yx0abDzf8NdI5vjsGDd2mZfO0OZyQsc9OAWpLDppyOHq1QMN870 ije5PBKI38UT+GzUJwFFaHvszvQtOWWxGWxrVXjtPgMfuaae41wkzQXCyX7Odpx74m9uhkJZVe0 h20c5hkUqEg== X-Received: from joychakr.c.googlers.com ([fda3:e722:ac3:cc00:4f:4b78:c0a8:6ea]) (user=joychakr job=sendgmr) by 2002:a05:6902:b12:b0:dfa:7282:d6d4 with SMTP id 3f1490d57ef6-dfacac47b9amr605485276.6.1717610409394; Wed, 05 Jun 2024 11:00:09 -0700 (PDT) Date: Wed, 5 Jun 2024 17:59:46 +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-3-joychakr@google.com> Subject: [PATCH v1 02/17] media: i2c: ov2740: 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/ov2740.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/i2c/ov2740.c b/drivers/media/i2c/ov2740.c index c48dbcde9877..0101ab55a5ef 100644 --- a/drivers/media/i2c/ov2740.c +++ b/drivers/media/i2c/ov2740.c @@ -1212,8 +1212,8 @@ static void ov2740_remove(struct i2c_client *client) pm_runtime_disable(&client->dev); } -static int ov2740_nvmem_read(void *priv, unsigned int off, void *val, - size_t count) +static ssize_t ov2740_nvmem_read(void *priv, unsigned int off, void *val, + size_t count) { struct nvm_data *nvm = priv; struct device *dev = regmap_get_device(nvm->regmap); @@ -1241,7 +1241,7 @@ static int ov2740_nvmem_read(void *priv, unsigned int off, void *val, pm_runtime_put(dev); exit: v4l2_subdev_unlock_state(sd_state); - return ret; + return ret < 0 ? ret : count; } static int ov2740_register_nvmem(struct i2c_client *client, -- 2.45.1.467.gbab1589fc0-goog