Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp440962rdb; Mon, 22 Jan 2024 08:48:26 -0800 (PST) X-Google-Smtp-Source: AGHT+IE25ruSP4upbZ3QjyFSxZHDJwOGk7LT6fupD5MKfQooqL8sitqa0SLxsVlmX5fvzICffzeX X-Received: by 2002:a05:622a:590:b0:42a:208c:bd8c with SMTP id c16-20020a05622a059000b0042a208cbd8cmr7296162qtb.91.1705942106550; Mon, 22 Jan 2024 08:48:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705942106; cv=pass; d=google.com; s=arc-20160816; b=kdT1krUZ0mZvSdMEVP8sD2ZKKl4teLV6CTW50hiiYlVOUTDSx7oOIBQ0j2Q/gdBeYk sY6wnp6NJ+PR2N+9hFClbdqt6gvThr8apJWvEe8n/Rqdge9TSDncP+Dhg5+GSiIt1eSU y10/CS1ISYWkalF/xpa+0wqV5Gnbui1uw8VER/eC7cpMANJcoUatrPKvDS9mNyctdGu8 1QpVvFUlmFKVNCHb6ZnzA3jXx2o9RW8KwqbJWLADIz+Uxo6px7AdgdRpBdBa5yIsrEsE +q+X0pZy7Q01paVFAhdIVK/B1nCqWFoKjSolqP+PiUGd5j87qGv7U8m28FWLSpEFR4My BWJg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:subject:cc:to:from :date:dkim-signature; bh=3NSmP683nHsYZ+QYwFDjWG0Am9VIQRDzOaWrn4+k4gg=; fh=eXzY3uCod0uoUhoSFH26hwNyKgz3imtHgoKrWTV58bE=; b=LSj/dD4H7I51Kor1NkS16dnlaHfXdU0YfqW3rqb/z0d+wgH3uKWCqj7vA17RK4bLZ4 rrRHU4gIOTDpRbbGNGdi85u1ACX3o7IPadObb/Oo3WQv92X3NoVW7/Wf727vgcmFNlvg LUHgLYPuuHq4THKamrTEwHKcT6rpIsij8R8sXIyTMtB82H3K/3FVBKLMrYmOyQqCjyRT /n46VGo4DZL0P18Xlqf2eDstE6wqyqLTcShLoKV8NI6BjTy1XGPISJEyry5w6jx5v2yX ZA3Sk5VCWYJ9YTBCrhV0ep6XXC7nVrSILF+r7ByXoXA8UyHHNPXVTxCbyCzvCwzZ54l8 5zZg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="D/yBbLD2"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-33575-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33575-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id u8-20020a05622a198800b0042a33b18c22si4774493qtc.397.2024.01.22.08.48.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 08:48:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-33575-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="D/yBbLD2"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-33575-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33575-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 5054D1C2524C for ; Mon, 22 Jan 2024 16:48:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 72BFE59B43; Mon, 22 Jan 2024 15:21:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="D/yBbLD2" Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (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 18502405DA for ; Mon, 22 Jan 2024 15:21:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705936876; cv=none; b=f80uFBeqRAarSU4p6N8CYoGZUr63veWjVxYNKGnE3M7xK1hYk1BcgK5UyHwTsubWnDAlNoIaEyMw3F+3SE2yk28DqRlvNiKrd7/Q4sCCBLwXE0dQ9sC4D+4e6cArlvBM7rjetu/XlzE2se2kWshrwQUOO3RddFIColkbO2eAWjI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705936876; c=relaxed/simple; bh=fUfuTS1ONtt1Sc+QMJaOn6OAPkhCtiu6J0M8A7SoJa8=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=Mo5wUsmz9dPEvk9uqOy3lwTxP5NYNA7ElDN4WzOYflbSgqwmuoVgh4gvjXVTkUYT8X4ej9U93oYAreninYiyH1LmxSYi0G5HNlbNrQ04Ot8ZDhjti/sVbD28dSUoIpv7W2Hf9A4bQaOps5+ud4kUONxGb49SyrxSJDx4djYVGYs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=D/yBbLD2; arc=none smtp.client-ip=209.85.128.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-40e76626170so37624705e9.2 for ; Mon, 22 Jan 2024 07:21:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1705936873; x=1706541673; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=3NSmP683nHsYZ+QYwFDjWG0Am9VIQRDzOaWrn4+k4gg=; b=D/yBbLD2Z9NmmMarOc0g3Zy4wqpJ7mmfYz+3x6zxlNkNMqU4w/Qf3lfBsQh0cbDSpD jFCtpNcZFf4yke329Grdm36+MJ9R7xTJ54V8fjPInO4xmgCln5+DRvyw2h/SnpqGOl1H PH5HeLlB5Ofl/8dTQSgbzIbko5kiF0B/Pd1m7tN+PMX2U9eVLrsbB+6dvZ6yqQZWxuCu MF+QTu/jcKUojmGVsCTMh2vBRwQQexgg8obr8Ys4kni+ggRa1dG4/CzAaMewQf/DME29 6+zodjrYx5izdXrGgwbA66xkStFN3cmzisE/dSCcu/QPflXYaC57PH7Xx7L/c6UoEJm4 B5Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705936873; x=1706541673; h=in-reply-to:content-disposition:mime-version:message-id:subject:cc :to:from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3NSmP683nHsYZ+QYwFDjWG0Am9VIQRDzOaWrn4+k4gg=; b=dqB8dsZBoxkB4/J6egYm4jytyLoPVEp8UCR+nEuLxpU/keBXNGFevPj3w2Ln5X/UEK tMxg9DLucTcNtK5dudOzdYM1BwUzrWGk5bpmEsOFCiFWLpEpceiY5g+wRh9Y2roooq9M VHpo3Vh/Ck8vfvS4kxhB8An16nuyRS2JG273US/hOOsFuysmywxW+nSpVemKXmYl86EY QaI4cPCKGxSLbnCIbPisjJcWAR/+9UUfsopHNQyO80ca7Wu3EPSCVpscg5vK/j4+bsmL H7/w92V1PZwFMhJPJYwNiCbZnJyQjiZ8TVe2R4ZLrTRBJO4uFGqPDLIbymd2aflnU8tY mSgQ== X-Gm-Message-State: AOJu0YxqeyjJFftlTdMp2HNVqRgBCpBlHymLyN0spxOzOfZO4HzWzXXO Gf5i80ZllnklQ0kgnYvy1W6byJHDgKKtPIEZmgvW0uARjtzqw7zj+3GHJpE2jbM= X-Received: by 2002:a05:600c:3847:b0:40e:553c:dace with SMTP id s7-20020a05600c384700b0040e553cdacemr2272796wmr.92.1705936873221; Mon, 22 Jan 2024 07:21:13 -0800 (PST) Received: from localhost ([102.140.209.237]) by smtp.gmail.com with ESMTPSA id jb13-20020a05600c54ed00b0040e418494absm38542327wmb.46.2024.01.22.07.21.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 07:21:13 -0800 (PST) Date: Mon, 22 Jan 2024 18:21:00 +0300 From: Dan Carpenter To: Jingoo Han Cc: Gustavo Pimentel , Manivannan Sadhasivam , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH v3 2/2] PCI: dwc: Cleanup in dw_pcie_ep_raise_msi_irq() Message-ID: 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: X-Mailer: git-send-email haha only kidding I recently changed the code in dw_pcie_ep_raise_msix_irq() to use ALIGN_DOWN(). The code in dw_pcie_ep_raise_msi_irq() is similar so update it to match as well. (No effect on runtime, just a cleanup). Signed-off-by: Dan Carpenter --- v2: Add this patch v3: Use ALIGN_DOWN() as a style improvement drivers/pci/controller/dwc/pcie-designware-ep.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/dwc/pcie-designware-ep.c b/drivers/pci/controller/dwc/pcie-designware-ep.c index 51679c6702cf..1c8d2e938851 100644 --- a/drivers/pci/controller/dwc/pcie-designware-ep.c +++ b/drivers/pci/controller/dwc/pcie-designware-ep.c @@ -483,8 +483,8 @@ int dw_pcie_ep_raise_msi_irq(struct dw_pcie_ep *ep, u8 func_no, msg_data = dw_pcie_ep_readw_dbi(ep, func_no, reg); } aligned_offset = msg_addr_lower & (epc->mem->window.page_size - 1); - msg_addr = ((u64)msg_addr_upper) << 32 | - (msg_addr_lower & ~aligned_offset); + msg_addr = ((u64)msg_addr_upper) << 32 | msg_addr_lower; + msg_addr = ALIGN_DOWN(msg_addr, epc->mem->window.page_size); ret = dw_pcie_ep_map_addr(epc, func_no, 0, ep->msi_mem_phys, msg_addr, epc->mem->window.page_size); if (ret) -- 2.43.0