Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp8039921rwn; Wed, 14 Sep 2022 08:07:17 -0700 (PDT) X-Google-Smtp-Source: AA6agR4pn7wWeT7SwVvsXZ6bdJRMAJSjEGpkndO1z2kiKYQgMnmB0XquL12sEtz2a3rxQBtDfQ32 X-Received: by 2002:a17:906:58d6:b0:733:77c:5ed1 with SMTP id e22-20020a17090658d600b00733077c5ed1mr26433541ejs.454.1663168036906; Wed, 14 Sep 2022 08:07:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663168036; cv=none; d=google.com; s=arc-20160816; b=HoH9PtN0hLmdCEyEj1UMN9Ox1Tes5S+A5MtUq/m2N+LE6igdNE5EcLz7KaMvoqbSKV xPNN90hOh3VaxVeu7L17QAzy5yHDg9DLTs2YiAKDEWu9RnybVWb11JRrX2RK+DHRiB0i j69zBzSyTsyDtVqnvE7+a+ZYZRW1WbLmb5MK9ySvk+SOL9O6LHnW5d+Cg+1m8arSElm5 GHfX6yheQkWwOraFtJl7PEeSDd1XIO/4akAptmJlIMD04U0MXOV46qA4ZGuRJzjXD/bR c4gH54QE3AruI0wSsVKQLMNqlXV3vVlcoZmJq3TTharI2LAvm4Eupzko9EU2QMxBEGO5 h2cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=WcZNZTdEfvImQXpZO6MAq7elID0poWTvUVCVa7+WHLE=; b=PP+FJ3bo03Hvy4j0bJVSf0nStU3belTEMaiB4s6YQ5xyKsXcqp0RC+/IAef+tRwUJt 0WE8MXGfSkTLapFUeHaVyutq7ZpLUKCkFWsMa378LemHcQF2QkDIRtppDoHaI3k3+2rK mjlHt8bMaxX3RLKQ364ujZQY3xYNfIWj1//mgRXfLbBnA6hmtfuVexbE+91E/KW70azl 42YOV9yzRMbvOK1RCTG5rbtsjJquaCBMuBOqYTc73qKidnnUsVKJNb+L3+Ran1e9sDf4 mrqGQKXta6XnDeAofsGXeiMaPgLF1X729XLI/jZ+I0lte5Bwa83t3FCj+dSPCW+sLK+W dUWg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sc42-20020a1709078a2a00b0073dc0a15a74si13558861ejc.48.2022.09.14.08.06.51; Wed, 14 Sep 2022 08:07:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229997AbiINOXQ (ORCPT + 99 others); Wed, 14 Sep 2022 10:23:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229889AbiINOXK (ORCPT ); Wed, 14 Sep 2022 10:23:10 -0400 Received: from mail.sf-mail.de (mail.sf-mail.de [IPv6:2a01:4f8:1c17:6fae:616d:6c69:616d:6c69]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 486F9481C1 for ; Wed, 14 Sep 2022 07:23:05 -0700 (PDT) Received: (qmail 29917 invoked from network); 14 Sep 2022 14:23:22 -0000 Received: from p200300cf07104d0076d435fffeb7be92.dip0.t-ipconnect.de ([2003:cf:710:4d00:76d4:35ff:feb7:be92]:42614 HELO eto.sf-tec.de) (auth=eike@sf-mail.de) by mail.sf-mail.de (Qsmtpd 0.38dev) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPSA for ; Wed, 14 Sep 2022 16:23:22 +0200 From: Rolf Eike Beer To: linux-parisc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH] parisc: remove obsolete manual allocation aligning Date: Wed, 14 Sep 2022 16:23:02 +0200 Message-ID: <2442384.MTfJ8ztCV8@eto.sf-tec.de> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org kmalloc() returns memory with __assume_kmalloc_alignment, which is __alignof__(unsigned long long) for parisc. Signed-off-by: Rolf Eike Beer --- drivers/parisc/iosapic.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) I must confirm it's entirely untested. diff --git a/drivers/parisc/iosapic.c b/drivers/parisc/iosapic.c index 3a8c98615634..bdef7a8d6ab8 100644 --- a/drivers/parisc/iosapic.c +++ b/drivers/parisc/iosapic.c @@ -221,16 +221,7 @@ static size_t irt_num_entry; static struct irt_entry *iosapic_alloc_irt(int num_entries) { - unsigned long a; - - /* The IRT needs to be 8-byte aligned for the PDC call. - * Normally kmalloc would guarantee larger alignment, but - * if CONFIG_DEBUG_SLAB is enabled, then we can get only - * 4-byte alignment on 32-bit kernels - */ - a = (unsigned long)kmalloc(sizeof(struct irt_entry) * num_entries + 8, GFP_KERNEL); - a = (a + 7UL) & ~7UL; - return (struct irt_entry *)a; + return kcalloc(num_entries, sizeof(struct irt_entry), GFP_KERNEL); } /** -- 2.35.3