From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) (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 73830296BC1 for ; Mon, 13 Jul 2026 03:31:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783913511; cv=none; b=av2Isc+ye3NultGKKY+p9FaaJge68tAp1M0mMswiNQktzNNGGDcUKlSHbiBgj1UtZaj13L/iPVjBH+u3AasMp2WY0YzWbCrcjZGxHvzWo1OEpJ6mKOCnRKn6Kf/uunRXi+Chb8F2HexaRwE7bem+PifxNzIUrsD+egq8odZQNCc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783913511; c=relaxed/simple; bh=WBtQWQRQLZ3+dIWQtnefpQVzOJC+bEiYRJCJsgDBq0c=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=f0y5KvHDv1Mcuxf7XsmULdIDeiw8SxYtg4+zQCwUWcsBiWBjiluSFrQUqDSTGL4ubbJIzV3vgC9WrkJgUwtf4tyoGmArTN2api/rGBXyAAkYvTN6ia1JVbV4jMTLDU2xBaj38WyLqt7B5gT8kefWH4fK41lFbbTc9RQMNPbkLdY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=KzAhMKP3; arc=none smtp.client-ip=209.85.216.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KzAhMKP3" Received: by mail-pj1-f51.google.com with SMTP id 98e67ed59e1d1-385ea3ce80dso2978932a91.2 for ; Sun, 12 Jul 2026 20:31:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1783913510; x=1784518310; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=MsiouPU8c+6FKj/CX+Yj36YD+qsjrWhaM84VxnsY3Pg=; b=KzAhMKP3X+WHbUxfK84fG0Xj3fFQWHidqyOJ1V2NA3rPCsApwiqHDcOf7P+3AbbW56 rHYIy6AH4j3qgqw1MJuMH1ZcMp+fMI9DnmZ4uNaB+c98K3D1lnVxnIxm6Z4nmp2fI6yZ TEasneTLWW3BNAX/WN2UAiKJks1s1I9h72A+solJz66/QRMCpJ7h3skxQ3K9pjZ8Kpx1 wB3YjLMVZWghl2/gc6iu/+rq4VZFAtkU6373PAADmRp6DvdzRiyGQQ7eQOxsVbf/LJcE PHGHuBMyCX21auyfuwgYpiTmUx1G2mcgJ2v6PKzApZyr8asKvYrpigRTAmeFm9B7e3yn Kq7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1783913510; x=1784518310; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=MsiouPU8c+6FKj/CX+Yj36YD+qsjrWhaM84VxnsY3Pg=; b=IjEQ2xoRn3pqN9wHs7Ax1aA+K/48mVuYTYX/MG8Q4+HTWVlgtTZSiFQmR5EDPt+6NB Jl2goFMusTnCcbwW8RGnfk7nMVDYcXflGrgqWC8q2VfObOM/RVYKcTafQbYdcyKp/3K+ nOF0bw+3p9fGadKFdeuCwyMuIc0mY1EeEyv6+as2WExz+UQQqTI/aV7iTosveStKt1hF ff9D+uFFHd4aNVJYhS/ESbH41waid+Z/M+nQFk2ilU0JcgqYWNjHZZb58QJT1BWHKcsS qQYQqo/YMrqwYuxM2rfBhdJqyVyQtoOvWHNniclnwUjqzGcibHl7bkck0E0gsAjrmRq/ 1H4w== X-Forwarded-Encrypted: i=1; AHgh+RqKG3Qhxc0+6Pxiq+EblzFFXp9UkI9z5HnQoENpiBt4xPcAJWrnXi/ODV65Ds9zy+WgwZXfg07MJvr4HyE=@vger.kernel.org X-Gm-Message-State: AOJu0YwF3DmL4FXx9FfYOdp3e9ZH77pccA6ye9EeabGz1ogqK7g3VjvK 0YHcilgWOt9OkUb39PVZn3dswjfrJxs+Y4nWtGvu6co3rtKYOPbT3yU= X-Gm-Gg: AfdE7cmqZY7GGyTQ1FqfJwYOj1KdS0o+JohHHe9t2FfVqbakwVFBS/bQAHxVAbcddz8 ufLmaefsGLfPq2eMkz+JZNgzkGvsr2ERm3ImAaCPGtt6ihnomLnPuQ+CWuQbl871srAhI9RAMj1 yDipzRPCWI8OOknDZlD9jy0QOt3CNXtWdIS4BTXAroc3f0UN2+dZTy/ZZQmfiDY49wn/jfp4d2p O9fwVcOx0/PPQtvtyulbscUgE4K3Uk7vjFPLDW5BnviQn7mVSrqTdQUoQa7GbQAqxKR+rZiEOjI qW+FP1rXNQ3etTBd806WRIObc6M41stqlHUrjzfLvwykwlklnQ1GTwOOqmALS0ADwFTxnsYHlQK yZq4CC+PT4YrauEeOF4jNvctpFASjpiy4vPC/zRZd8lR6Cf7A+LV6ovfOoeuvrcOlBcTuHAuD2+ F6qKiTsTChhV6kLSVCoaF5k3+aE7XY2N7Eo+L/LzENWEiRzfD+WRyMP/4OymgkCXW/iNi2 X-Received: by 2002:a05:6a21:4ccb:b0:3bf:a8d7:4f4a with SMTP id adf61e73a8af0-3c110be0abemr7441911637.40.1783913509688; Sun, 12 Jul 2026 20:31:49 -0700 (PDT) Received: from [192.168.1.45] ([101.0.63.154]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-13b987fc629sm14016195c88.0.2026.07.12.20.31.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Jul 2026 20:31:49 -0700 (PDT) Message-ID: Date: Mon, 13 Jul 2026 09:01:44 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 2/4] iio: light: opt4001: Fix incompatible pointer type passed to div_u64_rem() To: Jonathan Cameron Cc: David Lechner , =?UTF-8?Q?Nuno_S=C3=A1?= , Andy Shevchenko , Stefan Windfeldt-Prytz , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260712202451.20822-1-nikhilgtr@gmail.com> <20260712202451.20822-3-nikhilgtr@gmail.com> <20260713014319.7033a06b@jic23-huawei> Content-Language: en-US From: Nikhil Gautam In-Reply-To: <20260713014319.7033a06b@jic23-huawei> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 13-07-2026 06:13 am, Jonathan Cameron wrote: > On Mon, 13 Jul 2026 01:54:49 +0530 > Nikhil Gautam wrote: > >> div_u64_rem() takes a u32 * for the remainder but is passed val2, >> which is an int *. Use a local u32 for the remainder and assign the >> result to *val2. > State what affect (if any) that has. There is no functional impact, int and u32 have the same size and representation on all supported architectures, and the remainder is always smaller than the divisor (10000000) so it fits in the positive range of int.  I will state this in the commit message and add the tag in v2. >> Signed-off-by: Nikhil Gautam > Fix looks good, just add the tag for v2. Sure, will add Fixes tags to every patch. >> --- >> drivers/iio/light/opt4001.c | 5 +++-- >> 1 file changed, 3 insertions(+), 2 deletions(-) ... >> return IIO_VAL_INT_PLUS_NANO; >> } >> >> L Thanks for the quick review. Regards, Nikhil