Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp4587096rdb; Fri, 29 Dec 2023 06:51:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IFu/RGnEH1ahM+xq5Q4S2r9lvJoycdY3fwXqPXUo+kVx1fKTV7odMZeNg8XEtzoF5G1VK54 X-Received: by 2002:a05:6a20:2512:b0:193:fd0c:a268 with SMTP id j18-20020a056a20251200b00193fd0ca268mr13047467pzd.29.1703861478512; Fri, 29 Dec 2023 06:51:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703861478; cv=none; d=google.com; s=arc-20160816; b=dsmK2I3/Tr6/X9yTitmmcrxkMi0qme3uO55tbzcgVmqBo3LmURbgvGwDtsVIH9F6Hd x9AgttDcNKJq1q6avpltwBtb4WsL3GO5H83JlQRKV9ykcW1QrkLobHn42zYjlIaKFYBm 2ZFFHs3ceysvgJmzHBZelxkun09GqixuDGhWr06qpop4tZlTtp7TQKH6qY9SfgQqhFx8 F151+6azLAuZew5fxW6ezmQwHOm0Nxm+8uk/i+XZWkMQnkL3z1blKRT63EAGd2aC6x3o wf91uv/v1DJQSM3YYe5xl2eE/lPqzsSs0BWFB8t4lMgKYNvtGg6Xjr9+TdUCHL/OkGnI ITLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=YKa45nZApGLI1oHRhJDV4+z0Whl/jFWXeTFLKCmk5tE=; fh=tZUGqPWM9NzuekPiTOV6K/dqMWBJuHYOP+uZxIFLuv0=; b=x2FBTBmVTu2IZ5uznHz4CjA4hxl313vPR9OdbZySpk/4WShSBlc3wDovKCseG9g8G7 MYfNWiLkDnFWezaRp2wfR29iwv9vnQLp/oCyettPPIjZ8KlLLQc97xCTLqg64xgS7Jn6 YrXMBJotbH4S3RJsEJpnZYx2G+DRzCMYgMwjpiMP6vXbNQ5PHprdsFyDNVRJXUF9bYVc 2WIgsoJRWbgUuAvumI5t9NAMqpcLckFvY2AGQTsUPLToGVJVl0CnVXhMtgKuTTZBWr+Y IQpBqVCZfTRxKIPsVm/rpP3xiGOXUj9edehCSNyqHJwXMr9d4bULyAk7IXukC2lu7x5k YllQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=epBXIWDp; spf=pass (google.com: domain of linux-kernel+bounces-13123-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13123-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id l10-20020a65680a000000b005ce0b70d2a9si5309211pgt.30.2023.12.29.06.51.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Dec 2023 06:51:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-13123-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=epBXIWDp; spf=pass (google.com: domain of linux-kernel+bounces-13123-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13123-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 2C2032835AD for ; Fri, 29 Dec 2023 14:51:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 61E4C11C97; Fri, 29 Dec 2023 14:51:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="epBXIWDp" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9B51F11C81 for ; Fri, 29 Dec 2023 14:51:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703861469; x=1735397469; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=dvIUAGYDbpNOrkJuEoFIYV3Hi7P1WdKlCDuxuKOr/z0=; b=epBXIWDpUHuANL1KjiLA9vvuW+Pz4fjdJFrXtXIzRpS52jvrmvGC9umm S/Hv/BxNecmSSGdeC+8Ir50/uYXitKtUNjGK0qpfxFcBr26EyKD+rv5Zi jcsQq6yEQPVyEE4ty6DLXnPrDYYjhKiN2aL/z1FMVJVAV2EHA/pXmCdkb KeTJOmNxEDjiX22+MuaYXewkmqN4T5k8ZcyZv8yhsHG4aesmv9ZNoW9z3 Yh2cKJDRZdus8j2uoSEQRfdMZwJi44vuTxDA/IUIU8HtYEbgyCP4S/2xM Kh56/zt20rFgPz+Yj+hLkQ9QLzwK1/AAKTLnshH3rca7CQ+MgtmwYe+yT A==; X-IronPort-AV: E=McAfee;i="6600,9927,10938"; a="3727766" X-IronPort-AV: E=Sophos;i="6.04,315,1695711600"; d="scan'208";a="3727766" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Dec 2023 06:51:08 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.04,315,1695711600"; d="scan'208";a="13303267" Received: from ijarvine-desk1.ger.corp.intel.com (HELO localhost) ([10.246.48.133]) by fmviesa002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Dec 2023 06:51:05 -0800 From: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= To: Peter Tyser , Lee Jones , linux-kernel@vger.kernel.org Cc: =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Subject: [PATCH 1/1] mfd: lpc_ich: Use ALIGN_DOWN() Date: Fri, 29 Dec 2023 16:50:59 +0200 Message-Id: <20231229145059.6138-1-ilpo.jarvinen@linux.intel.com> X-Mailer: git-send-email 2.39.2 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=UTF-8 Content-Transfer-Encoding: 8bit Instead of open coding, use ALIGN_DOWN() for alignment. Signed-off-by: Ilpo Järvinen --- drivers/mfd/lpc_ich.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mfd/lpc_ich.c b/drivers/mfd/lpc_ich.c index 73a0e7f9bd31..f14901660147 100644 --- a/drivers/mfd/lpc_ich.c +++ b/drivers/mfd/lpc_ich.c @@ -38,6 +38,7 @@ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt +#include #include #include #include @@ -1321,7 +1322,7 @@ static int lpc_ich_init_spi(struct pci_dev *dev) case INTEL_SPI_BYT: pci_read_config_dword(dev, SPIBASE_BYT, &spi_base); if (spi_base & SPIBASE_BYT_EN) { - res->start = spi_base & ~(SPIBASE_BYT_SZ - 1); + res->start = ALIGN_DOWN(spi_base, SPIBASE_BYT_SZ); res->end = res->start + SPIBASE_BYT_SZ - 1; info->set_writeable = lpc_ich_byt_set_writeable; -- 2.39.2