From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f182.google.com (mail-pl1-f182.google.com [209.85.214.182]) (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 9843A221730 for ; Fri, 11 Apr 2025 17:05:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.182 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744391108; cv=none; b=WDJsQjU5npMhu4T1PcqcbexRajZ/hBTS6xJMrjIax5hEO3o+agM3t+m4qGw6arbch+X0/2ICmbckGODXQMOaxmuvNIB9YqWQg8dOSWlnLobp7E2dhLdT0KQdoktJVOWcwqEWXWNUTGiloyiLf1ui9hK51MRhYDNM6nLY0DDYKyw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744391108; c=relaxed/simple; bh=Zs24uJAaPNdL7CMzi1gfleFstPNRatFfxR2lJdWyGy0=; h=From:To:CC:Date:Message-ID:In-Reply-To:References:Subject: MIME-Version:Content-Type; b=D0gyhFxJpb4CMWw5HPmPe6Qw5DcBgFs33IYFR2cYTutjpzfj8Dhlo+5T4AhqHcGXZ/TLMbkzfAyvl9gUh3YAzfap0i9kp7h0Mhu2DAFHY16u1sipDOxuL8EDRznPLDLRAtsU0M0NTFRiQOqg+LOKPEtO9hLO0w47CnrIICdAamQ= 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=XvJet4ta; arc=none smtp.client-ip=209.85.214.182 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="XvJet4ta" Received: by mail-pl1-f182.google.com with SMTP id d9443c01a7336-224019ad9edso30573495ad.1 for ; Fri, 11 Apr 2025 10:05:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1744391106; x=1744995906; 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=XvJet4ta3eOAGfjticpH7ME4nff2cHJhtanIpB14HhW8IVhET2Y1kRk0kqzRmPh/BM blSgj6Ffn8llUOpzv31KfC7s2UtlOobR4Udy1S05gKBDD7S+r1wt8PwfFvVr0HyyoWUQ H1ur6WZhKsvsVyDP9bbHVUq1VUcqBAcWW7lcc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1744391106; x=1744995906; 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=DV+RACPQ+JIRLJ+l/CtT9GiSXqWYmA48Jwlrm8XDh4UhV0fQBlzXbNBh5083z0EtaL e8xxzX9euieQ4omSR3f7k5smvix8/vb40OsYv5ifvFBU5PS2C+YH/XrU6jVGGWtSDEmu SV4AwwAg6TyIYeMYe1gA+Ck/57Doi5Olg0DtFYw5QIXA2j/JYApE0ff0yZHEALhPaAnN RiCsumIFn4j/+HgNL6KHTBr1uFp460uMAC79+m+3rqoW0sVS8AdNG0hdG4zlhxZSKY1R Zvlxzdc6TuOx2S8/qsHc0Q37EmIxM/zyFLgUMhSkTnpZUt7IAID5Es5ce7zYJ8NwQPiP TJKw== X-Forwarded-Encrypted: i=1; AJvYcCWHre4oY6ZtjnJpaBIeTcjzPzeRMBsVroLK3jsz52hhb5MiM6wL2ufNrCHfI27Uiwofnvet6p9o8TD2Nw==@vger.kernel.org X-Gm-Message-State: AOJu0YzenZQPC6cbUyKzYcOj+j1gF9b9HkUKYOmyBZDjfN9bFaIU9ejS aAYWvjXVUrnppKBOCrv8K7sZzfw4hn0o99tlwPVLOc3IsEKQ87UgAGsY2wShZA== X-Gm-Gg: ASbGnctMMPEr1vW7ur1P9yIfVgwS/JLD+WQ7NSksj8CaHJUCaplAp18aEaB6u8Q7VN5 WdWKK+GE/8cAXY8C0c7/HhjsKO1cOBj8pRbD7qFbfi5Nr2Rm3rg0TmJRoN9WQ/ruRCYg6xDwGXh 1YHHksI8nlpOw5jsDxKT2zLnL4+PtPvF+wAgJ6vYe9bgUL9//FZt8Jqgzueswqm5LgnKpXpHuOS PeOA5r5wQiDTtdnvyj5kXmVV8+8CndbumKEVbM0oKUlp9yp2Yib9P1flRTabRCzm8+1UyJ34yGp oE79aEx7FvKzxhBXD2Pe73Lgm5uK2ZImNx2znLWyB9Xvxw4j5Mxg02fBadLkY0J+QBVg2EsPaSF AZxo= 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: linux-input@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