From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f73.google.com (mail-ej1-f73.google.com [209.85.218.73]) (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 9D8142F0C7A for ; Wed, 3 Sep 2025 09:28:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756891687; cv=none; b=LTCkYHMS7Kple6Bz/pnrhKpnKeZ+NfjLMAtHbDq7g/KDyc8qvWydJEUIhltMDNcuHQAnyTfF9oCdZuPDtTVKazm9W6FvzfYFM+sIG7XB4tfbha/6OfSTudlKlCI+sjFr1713s5I4zju9BsthIF0ssTHYpF0axIBzJHY+yDktJ2U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756891687; c=relaxed/simple; bh=RDTKu9h7P2J8owWSAM18mx6quxofHLD1wpX6bUaKLbQ=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=X2QNw5OfkbCFxhqlklbq2DuAlV9k4ZV7npUPc0yEs4u6MRSed+N9Zuyg7v9hMZZaxaKfjsUl2c9fuyGP2zvenpKvmW0Xev9XkT1r+LqC0AruV1OQ2YPNthg7IJ3fuQj4nZYhMiDthYdxnWteLlbBkbaLo5UlwSpVDn53GxNFva8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--abarnas.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=RIqhT7S4; arc=none smtp.client-ip=209.85.218.73 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--abarnas.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="RIqhT7S4" Received: by mail-ej1-f73.google.com with SMTP id a640c23a62f3a-b042eb3ac03so193205266b.2 for ; Wed, 03 Sep 2025 02:28:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1756891684; x=1757496484; darn=lists.linux.dev; h=content-transfer-encoding:cc:to:from:subject:message-id :mime-version:date:from:to:cc:subject:date:message-id:reply-to; bh=TiPNCvnjapcrlxfeGYfsAXzGtFUSy9Sla5QKQ86OmtE=; b=RIqhT7S4Ds0aWklh5nN82Cj0xXhvXUazGP0JuxLh0C3ZGbE2mvho1G+Ac7UijMMgry 1yzXSr00gS/2tnz7Mx7t4D/FMBiPwZgLdln+DnE9A9+NvypIWToBJwSYix6vBNKEJzol tYxWnQtv/ePyFKvbtDlQNkh4L0ZolvndAP97wZLoB5CVYvzyR4ELJUGevyJ7C7NDQTHB w6JsIrGOwS3VkeDc8O/B//G8k9dHaceY7wMQs1TIhhL+VmFsyOKgf+Jcny3F0ZTHZXDk JR2+yEXm+/5r2PyYOculRgvAFvte8+dIty7feAjxWzjMD7MNciTVdOhw/5VNeLsbN+ym 4VzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756891684; x=1757496484; h=content-transfer-encoding:cc:to:from:subject:message-id :mime-version:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=TiPNCvnjapcrlxfeGYfsAXzGtFUSy9Sla5QKQ86OmtE=; b=bUHVytGiZxQdeo8nWSUltzSpYQcRwX959XRfDZUTmzI0v71cQQW15arZMLfvGFGbD9 O11ozFQcxFYL+O2I8CXXwP0IGIgVRxiUcZWh+RoEoJ1GL/37k1mZXANufl3OvDvvDq3L No9uQtA+ediUqnUQRaRH/aHkJnPbRTjXAPnTkMgDHlQZzTYKpYl1pUBoH7kKFjp52G9x rmtC+hLj39gAIiJ73f+U8ZUd51UCZbNX3icc1y+avwNrf0/4CV/tfa+XucC6MtmwAb9/ 8FnUpn75DJp+JEa9jnwt6ZNzOA2SyKJBTxLBIebiLwfuNxlcNKKNEhAqHsX4nPfIe2Xr 1thg== X-Forwarded-Encrypted: i=1; AJvYcCWyFZLoixvgYVWX+YpibGiyImvy1PK9g5g8eKsPPyhNoE7HGBnsdLyTyMcpgPQOK9xeVTI7w2y/wGh70eaU@lists.linux.dev X-Gm-Message-State: AOJu0Yy0hBCuD+XPmrE0eoS/3GUKR9ffU6G9v8NxJi1hkXrJ9DavGZu4 ytZ9RSVtV0blD0jDLuw1vv14XdmGpTuI26PArkCNYcuXzfInKSkpcWq/2LRQP35tXguyLZcpsmm +ALnNM9xpjQ== X-Google-Smtp-Source: AGHT+IFH5XwKUXYHk/3S5VJI7dgKyWD/UZ8O7WJTKCucvA63LhSVX1nX4l6gGeMpjYHCtQk+b/SuYYxHvsCs X-Received: from ejclj9.prod.google.com ([2002:a17:907:1889:b0:b04:54de:8bcb]) (user=abarnas job=prod-delivery.src-stubby-dispatcher) by 2002:a17:907:9494:b0:afc:a18f:65e9 with SMTP id a640c23a62f3a-b01d8c9018fmr1590592566b.27.1756891684064; Wed, 03 Sep 2025 02:28:04 -0700 (PDT) Date: Wed, 3 Sep 2025 09:27:52 +0000 Precedence: bulk X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.51.0.355.g5224444f11-goog Message-ID: <20250903092754.2751556-1-abarnas@google.com> Subject: [RFC PATCH v2 0/2] staging: media: atomisp: Refactor bit logic helpers in vmem.c From: "=?UTF-8?q?Adrian=20Barna=C5=9B?=" To: Hans de Goede , Mauro Carvalho Chehab , Sakari Ailus , Andy Shevchenko , Greg Kroah-Hartman , Dan Carpenter , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Cc: "=?UTF-8?q?Adrian=20Barna=C5=9B?=" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Refactor proposition for bit operation in vmem.c. * Previous name for function "inv_subword()" for me is not telling what function acctualy does - it clears bit specified by subword, so renamed to clear_subword() * Added a helper to create a proper bitmask for a subword, without using GENMASK(end-1, start) which was claimed to be unsafe * Simplified subword() and clear_subword() to be more readable. Continuation of https://lore.kernel.org/linux-staging/20250902073841.233856= 8-1-abarnas@google.com/=20 Adrian Barna=C5=9B (2): staging: media: atomisp: Change name to better follow its behavior staging: media: atomisp: Simplify logic in vmem.c .../pci/hive_isp_css_common/host/vmem.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) --=20 2.51.0.355.g5224444f11-goog