From patchwork Mon Feb 1 15:03:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pasha Tatashin X-Patchwork-Id: 12059173 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5DF9DC433DB for ; Mon, 1 Feb 2021 15:04:46 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E73FB60C3D for ; Mon, 1 Feb 2021 15:04:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E73FB60C3D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=soleen.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe :List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:To:From: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ogn9MZuoOZcmF7Gr8d5aK1jPfq/qhBOqVm/oHsYfrx8=; b=Qbqis01K7R4NdgDYI+16sw+NGP h5IpuiPhijxR2zCEITLUJMPvXzsKoGxKdDSrkE+gqIexMkA6doxkEgW38NzBtTB/fqp7Kj+I39bbi wdhjkUKFxcIOPdouNmuXAajQJuO7389DZm1oSF6uHEXvKKCNeNmr3hvEHk+DH9sHNi3r3amj7BiW6 IcFmmjT6zfMfNMxL1ytYxB+w6S7GhJDcX6QbmSEU0VLLrcD512UaOk3jHJgumjNNXjFnyLWnWXXSP MqJ/xgwfamJg2Bnsf5PiVvL0xzn2wo+wscUbTpcrXVWxAXcUZ7h4b6B5b6KYhWXP4BhHqJH2afjK7 DwZBzjTQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l6ajT-0001Lz-UG; Mon, 01 Feb 2021 15:03:16 +0000 Received: from mail-qk1-x734.google.com ([2607:f8b0:4864:20::734]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l6ajQ-0001Km-7L for linux-arm-kernel@lists.infradead.org; Mon, 01 Feb 2021 15:03:13 +0000 Received: by mail-qk1-x734.google.com with SMTP id x81so16479419qkb.0 for ; Mon, 01 Feb 2021 07:03:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=soleen.com; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=cwaD/KS9cDpaZAIVrcMBsnLRQJ75Ycyv9luEJSiPg88=; b=V9qM/Na4/H6vxU6R++Um3+t7PpzqkK1c2UlQV6OfYLsutcq/zUhowRcjN8JvNC2V58 x1oAnHYwtpwXadZo6O6RnpFa/oUX4TAvB6jPlVJ+187m5pWJQ3EDQ8tOLzPMdInmO1XH uaPBePZPhAdO9hRBCbqtfI7QPKPX+gztW+I5QmLNMZ573ZpzbGYxLbjqX8eOOW4zTjIJ l0LtTC8IxTMpPbnXb/+FgaxyFtX0MCsZbwrKwi0gftXE/Aeg1VH6+G3UltQwbqZw1dZa Cbo2JPVDjz/6AIWbX7AUtxE2mc7SZrnXux1Ulq8mTbOooiSDI2xvRYU9dFZbaIdKaorg O7cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cwaD/KS9cDpaZAIVrcMBsnLRQJ75Ycyv9luEJSiPg88=; b=QrOXW63NuHH8Fs32iuQ6BvtbqGVb4BML2hsmVCVuDTUVyvzdZcrGSxHIS7xjlMxqq5 wPA7F/BtwajHMtiJWjT3oWLvFYwCCQNOR9CvUd8yEjYhRfsfcLmPQXiBzsR9VLuv7Eq2 T3kQslDrbZHjZELTGAQhvzwjVA8er5/nuh7BFhYJ2rEvZb/cEBnZfIWOXvkPFR6URBEt 7W5iOovHuWEc09VbVKAYbReP1nXVtmO8aO/k4JTNdVQJMHK96KTs1P2YNKYSR3XS6KhG 5wlTU6/aK7i9Bm4MF4rXz7eCkJKyXTiOF6h0oLtHpk/7UgX3AEU6XcQmZueGVhEuJe1g M3og== X-Gm-Message-State: AOAM533An2hiiIq0PCgoZ7Qrb1P+OK79IEpI7vY801fM5IxMVgTPpbPO 1Fjq5kpTnybMnJZXo5NIVkN0HA== X-Google-Smtp-Source: ABdhPJz1xBjuAgzovFUei3M5R6nY9qHtlb6p7+ZK8swHO7gAiVhstZokQF9z3mi2exDsZuZNhkDcMA== X-Received: by 2002:a37:4691:: with SMTP id t139mr15832136qka.274.1612191790207; Mon, 01 Feb 2021 07:03:10 -0800 (PST) Received: from localhost.localdomain (c-73-69-118-222.hsd1.nh.comcast.net. [73.69.118.222]) by smtp.gmail.com with ESMTPSA id b16sm6970160qkh.21.2021.02.01.07.03.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Feb 2021 07:03:09 -0800 (PST) From: Pavel Tatashin To: pasha.tatashin@soleen.com, jmorris@namei.org, sashal@kernel.org, ebiederm@xmission.com, linux-kernel@vger.kernel.org, corbet@lwn.net, catalin.marinas@arm.com, will@kernel.org, linux-arm-kernel@lists.infradead.org, maz@kernel.org, james.morse@arm.com, vladimir.murzin@arm.com, matthias.bgg@gmail.com, mark.rutland@arm.com, steve.capper@arm.com, rfontana@redhat.com, selindag@gmail.com, tyhicks@linux.microsoft.com Subject: [PATCH 1/1] arm64: hibernate: add __force attribute to gfp_t casting Date: Mon, 1 Feb 2021 10:03:06 -0500 Message-Id: <20210201150306.54099-2-pasha.tatashin@soleen.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210201150306.54099-1-pasha.tatashin@soleen.com> References: <20210201150306.54099-1-pasha.tatashin@soleen.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210201_100312_310987_5E0CA072 X-CRM114-Status: GOOD ( 14.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Two new warnings are reported by sparse: "sparse warnings: (new ones prefixed by >>)" >> arch/arm64/kernel/hibernate.c:181:39: sparse: sparse: cast to restricted gfp_t >> arch/arm64/kernel/hibernate.c:202:44: sparse: sparse: cast from restricted gfp_t gfp_t has __bitwise type attribute and requires __force added to casting in order to avoid these warnings. Fixes: 50f53fb72181 ("arm64: trans_pgd: make trans_pgd_map_page generic") Reported-by: kernel test robot Signed-off-by: Pavel Tatashin --- arch/arm64/kernel/hibernate.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kernel/hibernate.c b/arch/arm64/kernel/hibernate.c index 9df32ba0d574..b1cef371df2b 100644 --- a/arch/arm64/kernel/hibernate.c +++ b/arch/arm64/kernel/hibernate.c @@ -178,7 +178,7 @@ EXPORT_SYMBOL(arch_hibernation_header_restore); static void *hibernate_page_alloc(void *arg) { - return (void *)get_safe_page((gfp_t)(unsigned long)arg); + return (void *)get_safe_page((__force gfp_t)(unsigned long)arg); } /* @@ -198,7 +198,7 @@ static int create_safe_exec_page(void *src_start, size_t length, { struct trans_pgd_info trans_info = { .trans_alloc_page = hibernate_page_alloc, - .trans_alloc_arg = (void *)GFP_ATOMIC, + .trans_alloc_arg = (__force void *)GFP_ATOMIC, }; void *page = (void *)get_safe_page(GFP_ATOMIC);