From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com [209.85.214.176]) (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 376F021D3F6 for ; Fri, 11 Apr 2025 17:05:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744391107; cv=none; b=CgU3eGpQBlgedQq4z8izxnMiDbMDXCFCQj2An3uIYjxsUjRqNZ9odpGQH7/V3BwEU2UUiDY3R4/tZ9PzWQHCOzwSbBjzycp4z6GV/fK/jLT95DuG6M8Pt7W+eV/ATSg7BxdUT7Q5gsfQGUPZ1JRoeDjOeV96vQh69qRDK6NpVK0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744391107; c=relaxed/simple; bh=Zs24uJAaPNdL7CMzi1gfleFstPNRatFfxR2lJdWyGy0=; h=From:To:CC:Date:Message-ID:In-Reply-To:References:Subject: MIME-Version:Content-Type; b=fuVYDpMcJQXnhGiB82v1JF5q5NK4f0ypC8usPyhmNVPBw6zWlWJstbk8lkHAOXL2aquUC8QYQ/mGjnF6wTrPzm8h6bv+efxCS/GJRr+WF5jSuDV+OcV/meqqF8sbNgu1B9pufhLoBHpvYfAchCjom2JmROtdLGLves8F3De3oGI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com; spf=fail smtp.mailfrom=broadcom.com; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b=OxfMaOLn; arc=none smtp.client-ip=209.85.214.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=broadcom.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=broadcom.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=broadcom.com header.i=@broadcom.com header.b="OxfMaOLn" Received: by mail-pl1-f176.google.com with SMTP id d9443c01a7336-227a8cdd241so27610475ad.3 for ; Fri, 11 Apr 2025 10:05:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1744391105; x=1744995905; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:subject:user-agent :references:in-reply-to:message-id:date:cc:to:from:from:to:cc :subject:date:message-id:reply-to; bh=Zs24uJAaPNdL7CMzi1gfleFstPNRatFfxR2lJdWyGy0=; b=OxfMaOLnJQdyVHmKmfgMB7kY7TuYFVxzicfsCuVGmKUc0IH7VQnF6vOCOhGCn3cr4i twP83y65t0+rt4q+fiPg3Azt6k4EBIhzKr0dqqLg4AHRLL9zP2MovlEjHCAvez41PG2c hivN/2ykxTQObCqNZD5pvXlSfHlimyyfgNgNU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744391105; x=1744995905; h=content-transfer-encoding:mime-version:subject:user-agent :references:in-reply-to:message-id:date:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Zs24uJAaPNdL7CMzi1gfleFstPNRatFfxR2lJdWyGy0=; b=cwlXtS2nafaTkCGNoUqaZwTSZjOzeVqUvi9On/qWNQTQVZGPGyRxh9mB1yyrYo8e7O NHxaZp0O7cReKdRYlF4Cms8vEtwM6zQCElrB614oPkPEUPS4wG87ZZ8fc3a1d+oHUrj3 oyz3CrBOcA7v/uvYBfcK+Iqeeyzi9c2WI3jnRry0QZkB/n0V5XQ32bGIsp7FNiNPKdN3 d8LvWd/LvOY1KpEnjWW7c/4tAc8XielkhOtc7ZBz6DXEgG1/Zn4dhMH7MiXFIFxUt27P IaLsw7iLnOwhUhtnWtUj/gjVBZMTTDN04P1ybzUJ5u+MPpnhSB4bDznQRHnl6BlzzoBB SYig== X-Forwarded-Encrypted: i=1; AJvYcCWZ+wDELwL7DyAt94pHFFgUQIzEtXCPFpd67OTkI05oG9ecbP3PZG8BolcIVYx6aRKpUmfGyK8=@vger.kernel.org X-Gm-Message-State: AOJu0YwsfS+6OGIpb7dVhV3XpecDMPOlSixEsQDBTPjqNzx2sYHgDK94 AFZgLvsSBR9kD9bmU+kZwwH7ouCyPWk52qoCvxTApov11FPRgvgiq/X/hieaVw== X-Gm-Gg: ASbGncsAL6uTVtqLleTQBBcz43VXeN6Y4Z5TXgy8uy3Adib1Hfju0vpaVLNVJQq2lP+ iGsRsLzH2YbHOEKZgqfDeNAUKoCu9wHz/xAy225DUzcF8OrkJc6hqE8Wc6oFpwq6qffcFeM5k5R eqmsm4263KpHPos5OlPgjiV7txxv5DhTTAR7La/vku9JsLg92jZfMsxP/S1of4x5f19Qh9ktPBB EdY8+ZndBEh8RwY6QJBs+YWj/4Ggg2oAgKV4lSe577Uwu748yyZRM19W9RKwlKZup33LsI2qHUR XLsCWrmAGo3JRdnFjagrel+qXJes2LexM7OtXTtXICWJ55h4b2zCXMJfRRGUNIh8F88g8jhfYhj M3/E= X-Google-Smtp-Source: AGHT+IFsxw8IYiWvCcCfohL9OR/GeWdiXtYFPHAC7JyqV95Ksyc9aMccKi6WlaMRFkxD3Uw+BXU/BA== X-Received: by 2002:a17:902:e5cf:b0:215:94eb:adb6 with SMTP id d9443c01a7336-22bea4efe58mr64393975ad.40.1744391105389; Fri, 11 Apr 2025 10:05:05 -0700 (PDT) Received: from [192.168.178.39] (f215227.upc-f.chello.nl. [80.56.215.227]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-22ac7c93aa3sm52081595ad.149.2025.04.11.10.04.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Apr 2025 10:05:04 -0700 (PDT) From: Arend Van Spriel To: "Kuan-Wei Chiu" CC: Johannes Berg , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Yu-Chun Lin Date: Fri, 11 Apr 2025 19:04:43 +0200 Message-ID: <19625cf93f8.279b.9b12b7fc0a3841636cfb5e919b41b954@broadcom.com> In-Reply-To: References: <20250409154356.423512-1-visitorckw@gmail.com> <20250409154356.423512-4-visitorckw@gmail.com> <25b7888d-f704-493b-a2d7-c5e8fff9cfb4@broadcom.com> <740c7de894d39249665c6333aa3175762cfb13c6.camel@sipsolutions.net> <1961e19ee10.279b.9b12b7fc0a3841636cfb5e919b41b954@broadcom.com> User-Agent: AquaMail/1.54.1 (build: 105401536) Subject: Re: [PATCH v4 03/13] media: pci: cx18-av-vbi: Replace open-coded parity calculation with parity_odd() Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="us-ascii" Content-Transfer-Encoding: 8bit On April 11, 2025 6:37:35 PM Kuan-Wei Chiu wrote: > On Thu, Apr 10, 2025 at 07:08:58AM +0200, Arend Van Spriel wrote: >> On April 10, 2025 12:06:52 AM Johannes Berg wrote: >> >>> On Wed, 2025-04-09 at 20:43 +0200, Arend van Spriel wrote: >>>> >>>> This is orthogonal to the change to parity_odd() though. More specific >>>> to the new parity_odd() you can now do following as parity_odd() >>>> argument is u64: >>>> >>>> err = !parity_odd(*(u16 *)p); >>> >>> Can it though? Need to be careful with alignment with that, I'd think. >> >> My bad. You are absolutely right. > Then maybe we can still go with: > > err = !parity_odd(p[0] ^ p[1]); > > I believe this should still be a fairly safe approach? Yes. Or whatever the name will be ;-) Regards, Arend