From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) (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 7A7C2314D05 for ; Fri, 7 Aug 2026 18:46:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786128405; cv=none; b=UNQ6guik3mT0fEydsNASZaFfCP2Ah7eOE2KokrVNNVplC6HXa5qUWtQhftewEyJdvF93oZ4OnjpvKnlbmKYqVo0mUgGTkHRF0apDzB+OAd+C802drR3ilxGw+zRtD/3gmGZko8LXgTThRyiwCUbAXo/cdCeWYcmHd6+f9zt2J+k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786128405; c=relaxed/simple; bh=Mt1zmwVvL7C599yV/V47xybzdFZKP2OIiGG+KWvil4g=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=NWb+i6OYSUmnutdIX1OFy7y8LVwUZwwqBVSifdzTi+Lp3Ag3TeQQTYoly2n143VENGpxcsxX8W7YcLgICh5NrAsja613D6plo8nHZ9hohwivjOMvmPJj6/bnfhLQffi2XcsQkswVIbAv2B9Sg90Nr9ukJ0sIxaKi8NmLPf0bbNM= 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=ItS/uDiw; arc=none smtp.client-ip=209.85.222.178 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="ItS/uDiw" Received: by mail-qk1-f178.google.com with SMTP id af79cd13be357-92ed19f4d60so155022085a.0 for ; Fri, 07 Aug 2026 11:46:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786128403; x=1786733203; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=eWr9SPLv59B6erYan06Zql1/BzjBsoX4KKVRypzN09g=; b=ItS/uDiwFDNoRaD599irdSKwSscxAVY3H9XJ9NJocfi9o1uuhyfesu2+7+QBE0LSAx r71yd2IuzLABzUpLhipT2+Uc9+yB9u2baQr2Sp6yEHd3LKFSGWvl8199JJX3BR5Ol5yZ 3ZSmrfVLoXg0vnsDSgMKLc5I6Qc2/3E9crwuCN+RojlZp7t+RiOrAAcBLIlKt+cIuNMd ZcqVeU0AiXIAN8hFX1qCja7ZQwUHeooEaBd1HFZWChuiDO0avUsNLe1ypfIrPtAp/GFl 7u00JaASipA98kjBVoaJjpjz0XtNMPaGk23z+bfATMlNRJZ7CtLonJ7NvBWMnXS5kp+F 9xWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786128403; x=1786733203; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=eWr9SPLv59B6erYan06Zql1/BzjBsoX4KKVRypzN09g=; b=QknQRtjiPKKR4o3Ok28IjMpTakZLgRGCt9Icwf/q7z61/k4SzOwpH4BnGD1NNlrmLO fkpH1FlLeru1MjYscVHpO7XmjhV4rk4Zc+WNMSkkB5ikRu8nSciuEMCYEZru33WkyoWW QbT2l0nknQPRGuB9KxKu98hzWx2He+hE/AY/OM4tKRgO3j9NViFY32IG+nkRRa/PP0jU JWSynBadqd3XCIXXADxngTRkTgV/0Ad5CdOZ32mGoCShSHM20/twzlqrlJQGtNaUNzfx nzZtwN5wRuGqtdl1zn9tLcAXHVcQAVyrnbc+NnoBYWVc1nnoOu7HMMHhcem/hgZ3k5Fe jwYw== X-Forwarded-Encrypted: i=1; AHgh+Rr81xNjfeIuY++UkeG1jdfSbiWnkkZ98fiiZK5LlP5gFfqhQsGt9130+hvnwjjIRHn0UMaHIAqwbRparhY=@vger.kernel.org X-Gm-Message-State: AOJu0Yx4m52fLNQaphqgh2Ii2moQ8nJaN2ivD4jlk/RkcFkSrh+A6nrM Sb28HaumoTvLoJlEPU9MedWbTm0Qlw190nue+e76IGcTAqfG4AqG2wTb X-Gm-Gg: AR+sD13Rkc8338Tbr0LhzYMjFU9k5SjLA/U1v7AZe2KUZuwRf1/URtzoZ7Afj0bPuof 5+zbkS8tAL6VdIosy9Fm9MARbmV5E4nPbjcEVQvsuIjGrIyAOkL2fFtIIpq3CLl/0tOH//5Y5B6 aHZh9cKwdd6XTxQ9sJvp/Ty/3EY0po2KpKXFHf6H07vw9jo/ziF97mHCqERgkw6SQGfva/7+UUw C/SQOJBete3Bu5tzxfPpa1eLXUGeS5k39B9gYa/pahVrkOZ0+5Ppesmk/LvNwvHwjRlxT9b21Q6 P83H34mbLGQBsbO3KV8aTaT0Jghd30Box5UtepFTRjiYnYIAmndUwsYES9QfXP2IojfdfTlfBPH GysIkdylArpm6yTUILXy2yJv8Mc3e5FsEu+c8GS2/cguiG/NKjHzDJ5fAsbVeEhoOWZs2mVi6LM gbP8srrUS1Z6tApCD7+R2fltAuI8zCRGC1r1gmI7UFJ1ml5CrVRWIPrZlptgdc612Dzwp8jhlRx 8PV X-Received: by 2002:a05:620a:1786:b0:929:f78f:6bf9 with SMTP id af79cd13be357-9367b672642mr91596085a.16.1786128403331; Fri, 07 Aug 2026 11:46:43 -0700 (PDT) Received: from localhost ([172.216.11.43]) by smtp.gmail.com with ESMTPSA id af79cd13be357-9366e0c17fasm210195185a.21.2026.08.07.11.46.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Aug 2026 11:46:42 -0700 (PDT) Date: Fri, 7 Aug 2026 21:46:35 +0300 From: Dan Carpenter To: Punnay Sharma Cc: gregkh@linuxfoundation.org, mchehab@kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 1/2] staging: media: av7110: fix corrupted BER reporting in sp8870 Message-ID: References: <20260807183443.13912-1-punnaysharma805@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260807183443.13912-1-punnaysharma805@gmail.com> On Sat, Aug 08, 2026 at 12:04:42AM +0530, Punnay Sharma wrote: > In sp8870_read_ber(), the 14-bit Bit Error Rate (BER) is assembled by > reading two I2C registers: 0xC08 (lower 6 bits) and 0xC07 (upper 8 bits). > > The current implementation masks the lower bits via `tmp = ret & 0x3F;` > but subsequently overwrites `tmp` entirely when processing the upper > bits using a direct assignment (`tmp = ret << 6;`). This logical error > causes the lower 6 bits of the BER hardware metric to be silently > discarded. > > Fix this by using a bitwise OR (`tmp |= ret << 6;`) to correctly merge > the MSB and LSB payloads before returning the metric to the DVB core. AI uses a lot of really unnecessary words to say something very simple. It explains the obvious stuff in detail and ignores the important bits. It should be something like: Checker tools complain that the "tmp = ret & 0x3F;" assignment is never used. It's probably supposed to be ORed. I don't have the hardware so this is untested. > > Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") The fact that no one has complained in 21 years, probably means it's not a real bug. I generally ignore these ancient things. > Signed-off-by: Punnay Sharma > --- There are a bunch of rules for sending a v2 patch. https://staticthinking.wordpress.com/2022/07/27/how-to-send-a-v2-patch/ Don't resend the same day. Add a note to say what changed etc. regards, dan carpenter