From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 12AF7244661 for ; Fri, 17 Apr 2026 14:02:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776434540; cv=none; b=rz/bJ4X2xWDMBMLfKCazN5r4CWx7NZyKensTsVZq0qvb1IaOj7qrhDUy6ZedhnkJLqUeuIOEkgQY4LQfoBFeVuA35TUkbquUCI7Y6IG0TYzBIwaLBluOMrB7DqM+I0kpHIQDtOW/mPkGCMgUV1ObdDYQEf7R7dMzphj/qVpleEE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776434540; c=relaxed/simple; bh=dZ9GD/Olh90uG0JI2WwMZDNp/4JluJw1R4f5usRRnXs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dOR6gDZH92+57F9d07gD8fc0PEKD+rxBbf+Ofsw+zln5JuufIIcfD/VqL8dYlOIMefsbKv/nmY3hou5ax89/TPZ6KFY8esQbPggw6DLOC3fxRIygnCIOIHuIX2qb+8OsBwLMNM7MGdvLA1yPF05zGBU0WaXX8wCx7YgrVBRPK2Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=YUv47AHU; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="YUv47AHU" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-488aa77a06eso12267755e9.0 for ; Fri, 17 Apr 2026 07:02:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1776434537; x=1777039337; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=u1g+4ReXpg8o/Hja17dXPjGo07lyXXK1KMLo4Txko/I=; b=YUv47AHUEtAz5zSLR7rbqLjH2eo2syTfnCHikapvqcQna1xAHvfb9eL7aY+XpWWsRt WzmmHCpIC7ZwNtyusz+JlcGwr1r6GjaxbDyM/sIX+NTQLkqRFUQfRNvOm440Sis/h+1t 9zE25MLDeSkcsR6h8LXYe3RfJ3esywn4ZtoS6mv4gy/E2MgvS95qRN+/BEoHd4q8ZO2m PfF9rwtSt4sYc8U2VXKxOabDgr0xGhqEEOCh8UO9IKMrb2h2XING6hY59iYxBLWJ4Uqw GBK+InDHFDo7tc/7yI6dgVwV8+gZTLMOyg7aqxoRs2A5Zw7WzJcaYDY9+s2v1JgALPb4 JTcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776434537; x=1777039337; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=u1g+4ReXpg8o/Hja17dXPjGo07lyXXK1KMLo4Txko/I=; b=JQkf5yllKxC4mPa6oM9G2AdCgaDJw1G7Jz3OlAcERSEIaYdTieX1jsGe6JSI68Fe5t 850dv4PSYGzYNr9LvmH9D9/JTFrcPBd84bGXlWdXsRSizqUs29rSwD4ZlXiKaTklJpXF 7RIqi303q4URFLoMFH3fotFa7N5CdUyBTj5Gp9CDmALJBvoxcIfOxGK50P21d+EEi2lo 0JlX2L0AqvcPzLvwAyU8os3bwrW97DK52rpLmtD/ZDXifpG8Vq5tEpiQhrL4WsPZpifz M17Ju/dRsxRyWyHsb2APAVMqYHLJiMqfy6boInfTTi24yjTmIg4OQaDP5V8/lvXXaIsm NxYQ== X-Forwarded-Encrypted: i=1; AFNElJ95lyNix7lofrJAOIdUZW5FIYdYaWhiPAETbXaN1r3BdAMXCpSsCOgIiW68ECPCir3+mYO01yHJUKUbV0o=@vger.kernel.org X-Gm-Message-State: AOJu0YwEV7iVDdq17Cx8ycXy2iPabl+batRVRTrtI2HeY6JneL736q9M 2TQpY1I+6LiNt2hsdrHb+6Lnyapb6BAv0Q2SM4F1aIcBTcBSNt4fFqGWg8r87w== X-Gm-Gg: AeBDieuqVJ2/icmmVWGEOzUBL2wzT2uhq8oW8RX8ldKb1yYpcpoV9eiU4c35oajeaB4 l5gs7CirMt/N+26GbgDwZoWNq3zN58J2KOuJlShcQRk/JUvnTV+rjKh7DoHGVrtrz3yN13+BYn0 mbh1Y5oMcva2A6XM51GyB6ui9X3mnD9udo/6fxKd46Ibjrn7DDnmji5kbzYFQ7tE00Wau5bzR5V EqOWBKjyWLGMcNLr/2s32I/7WKjGa+fzLGqc2/xadIOl9Y+/m+ejAoIE7CbCzc9/uIfotj6AN5r M/2BxAl44/5ytQxEi4DPaMbnA5AxaGAzQyEPEpBPqeZ2zwDNx8pio+/jU+NxiQTxUpHp0RUMxVQ KUM/wCTekyPPqrXopPSGo1ZzuS+SgrQcc+hYgR+30Z5k7GWqVVWbDM4nF7cOj5oc8RPMflJfHmN Ak1wztjqMkhJ3Kea7K4BnJMMO/zIOIsQ== X-Received: by 2002:a05:600c:c0db:b0:488:a14d:3d81 with SMTP id 5b1f17b1804b1-488fb73a9a2mr33391295e9.2.1776434537206; Fri, 17 Apr 2026 07:02:17 -0700 (PDT) Received: from localhost ([196.207.164.177]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488fc1cfbf2sm46780695e9.15.2026.04.17.07.02.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Apr 2026 07:02:15 -0700 (PDT) Date: Fri, 17 Apr 2026 17:02:12 +0300 From: Dan Carpenter To: Maxwell Doose Cc: tsbogend@alpha.franken.de, gregkh@linuxfoundation.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, linux-staging@lists.linux.dev Subject: Re: [PATCH] mips: cavium-octeon: remove cmd queue state and related typedefs Message-ID: References: <20260417023602.112359-1-m32285159@gmail.com> 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=us-ascii Content-Disposition: inline In-Reply-To: <20260417023602.112359-1-m32285159@gmail.com> On Thu, Apr 16, 2026 at 09:36:02PM -0500, Maxwell Doose wrote: > diff --git a/arch/mips/include/asm/octeon/cvmx-cmd-queue.h b/arch/mips/include/asm/octeon/cvmx-cmd-queue.h > index 67e1b2162b19..faef98173a4f 100644 > --- a/arch/mips/include/asm/octeon/cvmx-cmd-queue.h > +++ b/arch/mips/include/asm/octeon/cvmx-cmd-queue.h > @@ -71,6 +71,12 @@ > * > */ > > +/* Global pointer to the state of command the queues > + * Moved here to satisfy requirements in cvmx-cmd-queue.c for EXPORT_SYMBOL_GPL > + */ > +extern struct __cvmx_cmd_queue_all_state > + *__cvmx_cmd_queue_state_ptr; > + This is arch/mips/ and that's a different tree from staging with different maintainers. Generally, the rest of the kernel doesn't like churn so I probably wouldn't send patches like this one for arch/mips/. This comment isn't accurate. This is a Sparse thing and nothing to do with EXPORT_SYMBOL_GPL. Normally we would decare variables like this in a header file, sure. I guess the original authors wanted make absolutely sure no one ever used this variable so they declared as an extern in __cvmx_cmd_queue_state_ptr() __cvmx_cmd_queue_get_state(). It's unusual and paranoid but I can't think of another reason why they would do it. Generally, outside of staging, you just go along with whatever the original author wanted. They did the work after all, so they get to decide. This patch removes the declaration in __cvmx_cmd_queue_state_ptr() but leaves it in __cvmx_cmd_queue_get_state(). We definitely can't do that. And we can't mix this in with a remove typedefs patch. regards, dan carpenter > @@ -234,10 +240,8 @@ static inline int __cvmx_cmd_queue_get_index(cvmx_cmd_queue_id_t queue_id) > * @qptr: Pointer to the queue's global state > */ > static inline void __cvmx_cmd_queue_lock(cvmx_cmd_queue_id_t queue_id, > - __cvmx_cmd_queue_state_t *qptr) > + struct __cvmx_cmd_queue_state *qptr) > { > - extern __cvmx_cmd_queue_all_state_t > - *__cvmx_cmd_queue_state_ptr; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > int tmp; > int my_ticket; > prefetch(qptr); [ snip] > @@ -299,10 +303,10 @@ static inline void __cvmx_cmd_queue_unlock(__cvmx_cmd_queue_state_t *qptr) > * > * Returns Queue structure or NULL on failure > */ > -static inline __cvmx_cmd_queue_state_t > +static inline struct __cvmx_cmd_queue_state > *__cvmx_cmd_queue_get_state(cvmx_cmd_queue_id_t queue_id) > { > - extern __cvmx_cmd_queue_all_state_t > + extern struct __cvmx_cmd_queue_all_state > *__cvmx_cmd_queue_state_ptr; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > return &__cvmx_cmd_queue_state_ptr-> > state[__cvmx_cmd_queue_get_index(queue_id)];