From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EEB4AC433EF for ; Thu, 14 Jul 2022 12:38:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239421AbiGNMiM (ORCPT ); Thu, 14 Jul 2022 08:38:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238628AbiGNMiL (ORCPT ); Thu, 14 Jul 2022 08:38:11 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF7CD5C9CE; Thu, 14 Jul 2022 05:38:09 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id A54E01F8FB; Thu, 14 Jul 2022 12:38:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1657802288; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tN/KMnzfK08k1zHwz3a76YlKl7qTFBSFPkaQtZzhBJo=; b=YV5Hx2NpBVlFYKIBvEqpgHXPQQwef9F25yCzKOdH0qA8OdWvRjPiFxnl++EZu9IXCFrg9O EMtEVZk2ClHOE8Kljugr8+FrFPvpKPTKZ7B8nLeVCp0QW5e4XBAwzRFfuB6WyT3Bf4Hc7G IQE9yM/CB4rhQSOEHqUONIATGKxyev0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1657802288; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tN/KMnzfK08k1zHwz3a76YlKl7qTFBSFPkaQtZzhBJo=; b=UoPb/YSnPgXbrGsO++XfxbnF53as2lYK0wlytATcczF6KFt5QYJm3TuyK8XOlfX8HaWsNk F5l7YY+nQokV2uAw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 52920133A6; Thu, 14 Jul 2022 12:38:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id WawDEzAO0GKcfwAAMHmgww (envelope-from ); Thu, 14 Jul 2022 12:38:08 +0000 Date: Thu, 14 Jul 2022 14:33:17 +0200 From: David Sterba To: Wang Yugui Cc: "Fabio M. De Francesco" , Chris Mason , Josef Bacik , David Sterba , Nick Terrell , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, Filipe Manana , Ira Weiny Subject: Re: [PATCH] btrfs: Replace kmap() with kmap_local_page() in zstd.c Message-ID: <20220714123317.GI15169@suse.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Wang Yugui , "Fabio M. De Francesco" , Chris Mason , Josef Bacik , David Sterba , Nick Terrell , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, Filipe Manana , Ira Weiny References: <20220611135203.27992-1-fmdefrancesco@gmail.com> <20220714082519.A7C9.409509F4@e16-tech.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220714082519.A7C9.409509F4@e16-tech.com> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org On Thu, Jul 14, 2022 at 08:25:20AM +0800, Wang Yugui wrote: > Hi, > > Compiler warning: > > fs/btrfs/zstd.c:478:55: warning: passing argument 1 of ‘__kunmap_local’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] > 478 | kunmap_local(workspace->in_buf.src); > ./include/linux/highmem-internal.h:284:24: note: in definition of macro ‘kunmap_local’ > 284 | __kunmap_local(__addr); \ > | ^~~~~~ > ./include/linux/highmem-internal.h:200:41: note: expected ‘void *’ but argument is of type ‘const void *’ > 200 | static inline void __kunmap_local(void *addr) > | ~~~~~~^~~~ This requires patch https://lore.kernel.org/all/20220706111520.12858-2-fmdefrancesco@gmail.com/ that adds const to kmap/kunmap API.