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 X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, T_DKIMWL_WL_HIGH,USER_AGENT_MUTT 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 C7E6AC28CC6 for ; Tue, 4 Jun 2019 09:57:23 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 A1072212F5 for ; Tue, 4 Jun 2019 09:57:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="n3czJDoS" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A1072212F5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AzkyPG2Si0rEZZqxeZeNIJyl1bGU32j2Y/FGacfFQU8=; b=n3czJDoS5rpAtv d6SkyIlYU0NSnBtUEgd6SBCcgvkHcbz8FcUH7qmSnOcjxuXIyofep2f9h+e/XlACkB+1UPwrm7/OQ +oUER+q7GluvTA5KBP9mdxTqGGiTmnKffwy74rs5wzJdIKw1E8PRlq/YZl5NChTXDgdfaT6qgWAza S/k0/xukVX+KBBg6/1yDvdBvGjmxJtVcvjDCAsXo/ccpaxI7TF0+im/5NWYbKxeoKsYwNaLCiX0nQ PVhiupPFUSh5IH+aoXb1RkXdSmLrhzEQSHGAuw+MJdcTz41bfR3aD7+32uDaEuhZBH88bFtgUnUjJ CHTZlHGYkVb1KN+Py7lg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hY6C3-00089x-92; Tue, 04 Jun 2019 09:57:23 +0000 Received: from foss.arm.com ([217.140.101.70]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hY6By-00089V-Gb for linux-arm-kernel@lists.infradead.org; Tue, 04 Jun 2019 09:57:19 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EAB0B80D; Tue, 4 Jun 2019 02:57:17 -0700 (PDT) Received: from e103592.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6EFFB3F246; Tue, 4 Jun 2019 02:57:16 -0700 (PDT) Date: Tue, 4 Jun 2019 10:57:14 +0100 From: Dave Martin To: Viresh Kumar Subject: Re: [PATCH] KVM: arm64: Drop 'const' from argument of vq_present() Message-ID: <20190604095713.GV28398@e103592.cambridge.arm.com> References: <699121e5c938c6f4b7b14a7e2648fa15af590a4a.1559623368.git.viresh.kumar@linaro.org> <20190604084349.prnnvjvjaeuhsmgs@mbp> <20190604085545.hsmxfqkpt2cbrhtw@vireshk-i7> <20190604092639.GS28398@e103592.cambridge.arm.com> <20190604093153.2pzv55knl6axugrv@vireshk-i7> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190604093153.2pzv55knl6axugrv@vireshk-i7> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190604_025718_614351_1C5594A6 X-CRM114-Status: GOOD ( 15.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marc Zyngier , Catalin Marinas , Will Deacon , linux-kernel@vger.kernel.org, kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jun 04, 2019 at 03:01:53PM +0530, Viresh Kumar wrote: > On 04-06-19, 10:26, Dave Martin wrote: > > I'm in two minds about whether this is worth fixing, but if you want to > > post a patch to remove the extra const (or convert vq_present() to a > > macro), I'll take a look at it. > > This patch already does what you are asking for (remove the extra > const), isn't it ? Yes, sorry -- I didn't scroll back far enough. > I looked at my textbook (The C programming Language, By Brian W. > Kernighan and Dennis M. Ritchie.) and it says: > > " > The const declaration can also be used with array arguments, to > indicate that the function does not change that array: > > int strlen(const char[]); > " > > and so this patch isn't necessary for sure. This is an array to which a pointer argument points, not an array argument. I think that's how we hit the constified double-indirection problem. Cheers ---Dave _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel