Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp26370lqp; Tue, 11 Jun 2024 13:19:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXXJFS0anLF0GcWxngqNgUbIvdww+Mj0Ocbwj6ii0EBr7xzRhKzjyyUDk8uXA8/dG+1n+oNHejoc/zdcjgZgzRbNmvxB9akiW0po6je/w== X-Google-Smtp-Source: AGHT+IFmpsvsQxdfOnUDNMQ6FIE3Cz+odpPiS7dPs3DKKNY7M4KNzm6LwKjvmvyBOvvyw6ZxSUjf X-Received: by 2002:a17:90a:ba95:b0:2c3:e99:614f with SMTP id 98e67ed59e1d1-2c30e996295mr6009419a91.37.1718137175213; Tue, 11 Jun 2024 13:19:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718137175; cv=pass; d=google.com; s=arc-20160816; b=Xh/GHBoeMEBhU0gGGHIxKcJsLHWGkS4sxdShndQRzufNQf7KxJQOV1u+9KedBavoTw CcjNanc9fbh/OZEgvxyXvX2984J8Xcl01mnbERR0xiHlaBOGGxucuo9QSk1xpqEcbsMC VdjiSoOEicIpjGhSivn/q5vM3bY+cOukMESbH3KeoVbWRBDCLOOhbgwAIIFEl84HLWiN U1LNQpGcGLE9O42gwv/5Uth15b1dTQmGtBkIBsZJ0F5P0VjTdb3648SOBWAmqKZXfhLh vTOaMfzYDNO7ck45b2hWEmfpucKKj+WF45JqtbF1rDGvSe+/GSjNEcaJ5f5LEaWY2RSm tilQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=thread-index:thread-topic:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject :references:in-reply-to:message-id:cc:to:from:date; bh=B0rl8Td1i4C9v40xEQ0LWotvAtfVKB9RrCYRfWasDSk=; fh=tVl0qBZnu1ZNlE8KP78qnosiNblhRQ3jfZKrT1udw8k=; b=v/m6npZr0tgguAtV/9W5F6k935vPFXaEsv+ltE272FX/ANvskqWercXWmNGbwtOUST 9h5W4V9qVTxXpLjzT6Ph5ZVaHEXNei9sz+gOQNNoVDewS12e9mmTYQm4awveV6OLA5vY Nva6jUxNQnJBXJ3opOT6iZnp2oUYWfWtFUU3Iza+5jX5Z99hMA+aQuGgx8YUlFL2VuZL RGKG2TpdymbSStdTBF3CFerVe5t1C5iISj8DWBicv1YlpwkOth0B+9poEzPvBWr/jxmk 0KE783q7IEAea+xsvrXmz9g5BjfcSy2OAQ8ii2inV99TRbTGwa949tQYZqXo+VDr5ug4 KGpQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-210570-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210570-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c28067da84si9688238a91.81.2024.06.11.13.19.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 13:19:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210570-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-210570-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210570-linux.lists.archive=gmail.com@vger.kernel.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id CB00D281ECB for ; Tue, 11 Jun 2024 20:19:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8C9AD1534FC; Tue, 11 Jun 2024 20:19:09 +0000 (UTC) Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2EE831534FB for ; Tue, 11 Jun 2024 20:19:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.201.40.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718137149; cv=none; b=PK4C0RtfKUuAEMBZsdb4xBqSmQCXPatdZq4Ahiac5QY2B0oxuaFOTpZ3IdyG0QMT51nwiNTp6NmQpnr17jdgJf6d2pMbr7Y0iXibFYqR26CFV2pymy8gmmRzaa1w+4B4wRGrOH1ZodU/+FfJq0zfbMDdQ59qdlZqxA/335+PYvY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718137149; c=relaxed/simple; bh=RudqBTNT9j5reE6QOukW7HQMsv1XXfJYtnbSnLSsNd8=; h=Date:From:To:Cc:Message-ID:In-Reply-To:References:Subject: MIME-Version:Content-Type; b=eDqQhXdwidCADaosK7tuRYoYYNcuSI2P8ij8QnxtXieiorbRBUynKVdSbwp6R1u2/Cvcnog3+a2mLomQ2dE4ohV3LE68uWHR7kROQoiPZCHMMaLFSScbbs7L9buuyYD73G0cgJqNUgEtFl3bh89YXOcejyIOrHlOELMP2Bedrp0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nod.at; spf=fail smtp.mailfrom=nod.at; arc=none smtp.client-ip=195.201.40.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=nod.at Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nod.at Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id AF47061966B5; Tue, 11 Jun 2024 22:19:03 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id X-qeMHHyOscx; Tue, 11 Jun 2024 22:19:02 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id C464D61966BF; Tue, 11 Jun 2024 22:19:02 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id y9093tRPmx8Q; Tue, 11 Jun 2024 22:19:02 +0200 (CEST) Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lithops.sigma-star.at (Postfix) with ESMTP id A1B3F61966B8; Tue, 11 Jun 2024 22:19:02 +0200 (CEST) Date: Tue, 11 Jun 2024 22:19:02 +0200 (CEST) From: Richard Weinberger To: Nathan Chancellor Cc: Christian Brauner , Hongbo Li , anton ivanov , Johannes Berg , linux-um , linux-kernel Message-ID: <2144113714.220205.1718137142446.JavaMail.zimbra@nod.at> In-Reply-To: <20240611-hostfs-fix-mount-api-conversion-v1-1-ef75bbc77f44@kernel.org> References: <20240611-hostfs-fix-mount-api-conversion-v1-1-ef75bbc77f44@kernel.org> Subject: Re: [PATCH] hostfs: Add const qualifier to host_root in hostfs_fill_super() 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=utf-8 Content-Transfer-Encoding: quoted-printable X-Mailer: Zimbra 8.8.12_GA_3807 (ZimbraWebClient - FF97 (Linux)/8.8.12_GA_3809) Thread-Topic: hostfs: Add const qualifier to host_root in hostfs_fill_super() Thread-Index: y+ZRrqRbHMaINlAXXO3Imv4O2bKOCA== ----- Urspr=C3=BCngliche Mail ----- > Von: "Nathan Chancellor" > An: "Christian Brauner" > CC: "Hongbo Li" , "richard" , "ant= on ivanov" , > "Johannes Berg" , "linux-um" , "linux-kernel" > , "Nathan Chancellor" > Gesendet: Dienstag, 11. Juni 2024 21:58:41 > Betreff: [PATCH] hostfs: Add const qualifier to host_root in hostfs_fill_= super() > After the recent conversion to the new mount API, there is a warning > when building hostfs (which may be upgraded to an error via > CONFIG_WERROR=3Dy): >=20 > fs/hostfs/hostfs_kern.c: In function 'hostfs_fill_super': > fs/hostfs/hostfs_kern.c:942:27: warning: initialization discards 'const' > qualifier from pointer target type [-Wdiscarded-qualifiers] > 942 | char *host_root =3D fc->source; > | ^~ >=20 > Add the 'const' qualifier, as host_root will not be modified after its > assignment. Move the assignment to keep the existing reverse Christmas > tree order intact. >=20 > Fixes: cd140ce9f611 ("hostfs: convert hostfs to use the new mount API") > Signed-off-by: Nathan Chancellor Acked-by: Richard Weinberger Thanks, //richard