From patchwork Tue May 23 06:15:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 684887 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1549897wrt; Mon, 22 May 2023 23:16:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5tYqtuliFKI2ub41mzAjczkN9SCixAWC8SMN2Fsy0u+pcRKbBAvzat9+Gxa5jz/JiyC3RA X-Received: by 2002:a05:622a:34a:b0:3f2:f35:8e6f with SMTP id r10-20020a05622a034a00b003f20f358e6fmr21249564qtw.25.1684822587563; Mon, 22 May 2023 23:16:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684822587; cv=none; d=google.com; s=arc-20160816; b=KHx0Hmbyb2bp8lVI8J9XGfg+KJG2Job4Ql/ryz1YjarH4bbhLfbk5MTkCa9wOMiy3j VmtHdcIW3TTky02ijG4kTrTZ9PaO7t/PbeJocIrW+OMEpuu5nYolgg1yuzg3nXkyWzj5 rI7ei7tdZfXIZpuM+afpegd5VCS1EveS30qSDUA4EXG9LikuF1ISlqI0dvgY/pm++z4f vOLD03ggy57fTTRx7JySjSuHiB1EONqemq53ihwPuDjG6MJVjg6xPIM3SScRoFadCK1j y0d45/0VCaHowXvVFFLQs4tPJ8wxyq05Hasb2BjKikmjrqnX0LBXMlTTk+ybVOVvGr5n uk+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=hxpaBQnYbq6uneZzMMpOzN8+mfUPhtC8eR0rzpaDnw4=; b=sYj6ufQP1KLFcstgvNL1hN09kIZzlNvYR93mJgRM+V11/+QjBo7Zn0gW4enXSUHikm PKXbCbsz9NJpWvOIdfTS3hr+EsNdbLPBLY33EUreUG5W8EOqzMx4Z9mmMFrllGL7aB8+ buIkLXr4HAzY36bK2465J+aP2ZpHQcTUmUzZiAbIOp0vqlR9ab3lMG/R2Y6gMlsuSHYL Z7K4qZ5eMqrga2/p+2KEfX/J8hVNMzbNhaLnjM9i8ulF/uElY9RKQ7R0rU9H50v48fZY U4rbGxMTTUIvGU7f4IJAsSushnL03t4LxMqUiyRg9Ji9j1CzZFTGvaTOMezH4qmSwYIU aiUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cOLW07yO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id z25-20020a05620a101900b007517388a063si4378823qkj.416.2023.05.22.23.16.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 22 May 2023 23:16:27 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cOLW07yO; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1LJV-0004lY-SH; Tue, 23 May 2023 02:16:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q1LJS-0004k4-3u for qemu-devel@nongnu.org; Tue, 23 May 2023 02:16:02 -0400 Received: from mail-wm1-x334.google.com ([2a00:1450:4864:20::334]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1LJH-0005v3-42 for qemu-devel@nongnu.org; Tue, 23 May 2023 02:16:01 -0400 Received: by mail-wm1-x334.google.com with SMTP id 5b1f17b1804b1-3f509ec3196so29340205e9.1 for ; Mon, 22 May 2023 23:15:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684822549; x=1687414549; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=hxpaBQnYbq6uneZzMMpOzN8+mfUPhtC8eR0rzpaDnw4=; b=cOLW07yOtva/dc0Gb+LZZkb2LkaTSj8NdQy6E0hR8OUnA3kOIn0G854B1ch42O1PE3 sS+pzzr8FwALC0H4iwph1afBUW/RBNcAWpy8XG6hjCpCUfJD8B3VYe6zopnzKLc8qz9O In99XjFFb8vqy2c0gpGmxZFaMkDyhd0o9upxahhvc20bnjT5AyAHwDSdOATIWemg0HW4 /7bOCE5PLdlAVW49PSrXz7ZPFTobVwkngU/XWakMlf6+3PhsCbv5gteQ+yycFGn9+l8h gMwfPFtIVnP8fm6JM+cCC48zxpW1+Je50yuBarYtX1aaoomT4KSOkzHjj7Lk838WLBQY mZBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684822549; x=1687414549; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hxpaBQnYbq6uneZzMMpOzN8+mfUPhtC8eR0rzpaDnw4=; b=K2mNk5LEP+nGGCz2PkU5ZgbxY2e7HbP/YuvDaTChIAdg2Eyvv9LB6m0ORqh0zEbaMR aWFK6Vj9Xv9nrBLhOAhUXCa3viDRU6vNP6ds8hu4YlroNSCKEMGNjQ1LqpmYSB3T4G27 MHTXGrBh94p90Dc5p5USz65lxaCCffvDgWtIddTe8sB7Gi2ESiMPHcVlGnxmd/E3x6FO F3EjklwEmjz+WmCjS4VRBcovOm9EL/JdFmIPY+jxH8LaECyB1RYTkadGUv5BWiOGJR+r A7dyttrF0RcDlQz7+ynOWbAvv27c8ZUI5kpmms/NZVf7YgyNii6L4IKwMjTZ+A2Ytpci VRhA== X-Gm-Message-State: AC+VfDz6RfcYoJSycQwjVtTmk1ULTjA5TJ0UVC5OILfnQGgFJWffwUU0 3+Lr2EfTcIxYlGhtCPAxNDypGHnpwKCSnSv2L/c= X-Received: by 2002:a5d:658c:0:b0:309:596f:e5a8 with SMTP id q12-20020a5d658c000000b00309596fe5a8mr9020981wru.4.1684822549343; Mon, 22 May 2023 23:15:49 -0700 (PDT) Received: from localhost.localdomain (vil69-h02-176-184-48-94.dsl.sta.abo.bbox.fr. [176.184.48.94]) by smtp.gmail.com with ESMTPSA id k1-20020a7bc301000000b003f50e88ffc1sm13948454wmj.0.2023.05.22.23.15.48 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 22 May 2023 23:15:49 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Mark Cave-Ayland , qemu-trivial@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PATCH] hw/ppc/openpic: Do not open-code ROUND_UP() macro Date: Tue, 23 May 2023 08:15:46 +0200 Message-Id: <20230523061546.49031-1-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::334; envelope-from=philmd@linaro.org; helo=mail-wm1-x334.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org While reviewing, the ROUND_UP() macro is easier to figure out. Besides, the comment confirms we want to round up here. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Mark Cave-Ayland --- include/hw/ppc/openpic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/ppc/openpic.h b/include/hw/ppc/openpic.h index ebdaf8a493..bae8dafe16 100644 --- a/include/hw/ppc/openpic.h +++ b/include/hw/ppc/openpic.h @@ -55,7 +55,7 @@ typedef enum IRQType { * Round up to the nearest 64 IRQs so that the queue length * won't change when moving between 32 and 64 bit hosts. */ -#define IRQQUEUE_SIZE_BITS ((OPENPIC_MAX_IRQ + 63) & ~63) +#define IRQQUEUE_SIZE_BITS ROUND_UP(OPENPIC_MAX_IRQ, 64) typedef struct IRQQueue { unsigned long *queue;