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 816B8C433F5 for ; Sat, 27 Nov 2021 19:25:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356056AbhK0T2Q (ORCPT ); Sat, 27 Nov 2021 14:28:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235665AbhK0T0M (ORCPT ); Sat, 27 Nov 2021 14:26:12 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A209DC061763; Sat, 27 Nov 2021 11:22:29 -0800 (PST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1638040947; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=B1qxQCFfbrdFSxQkL8hZX6Zfer69wbZc+107UOQS45k=; b=E1FJbCvWO7yuYLjHi6JwLKVgq2jlrRGKU1HBNyRwkQgjKRoSGjUb4pVTuxy8aoeGJGziDl r8JphJFwXy3pRd938tJMCqGxnJcUAp9iA6H7wUgVJDLPQYC0hlltbZnQ7fw5eKbBG50NEQ FXLOJNHJX5/bywfSByEFauxlCkc/tKg30CWc3nYUoynQmX3k2ccGXnhWmWx3vjTJiI2hhg isRToszMiuoEqJ2vNhYq2qaKA1Kc14PumeixOZdyhyijjHMgqhIG/j3ipGInWGCKUkhwTV LJZ6KSloel2ZHgcO4LenCtL2OSRR9rqtn2MV2WNvi6r/dOTn5fDEhunBQL8+VA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1638040947; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=B1qxQCFfbrdFSxQkL8hZX6Zfer69wbZc+107UOQS45k=; b=YbWaCIQ16i7j9FW8GIP6eOod9vGpKoNmsdX1E4W3VcFQqHxjQb/AxNhkFM9vvx1QRhO7Yp kNlszx9Qprspl7CA== To: Greg Kroah-Hartman Cc: LKML , Bjorn Helgaas , Marc Zygnier , Alex Williamson , Kevin Tian , Jason Gunthorpe , Megha Dey , Ashok Raj , linux-pci@vger.kernel.org, linux-s390@vger.kernel.org, Heiko Carstens , Christian Borntraeger , Jon Mason , Dave Jiang , Allen Hubbe , linux-ntb@googlegroups.com Subject: Re: [patch 07/32] genirq/msi: Count the allocated MSI descriptors In-Reply-To: References: <20211126230957.239391799@linutronix.de> <20211126232734.708730446@linutronix.de> Date: Sat, 27 Nov 2021 20:22:26 +0100 Message-ID: <87o865flot.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Nov 27 2021 at 13:19, Greg Kroah-Hartman wrote: > On Sat, Nov 27, 2021 at 02:22:38AM +0100, Thomas Gleixner wrote: >> Signed-off-by: Thomas Gleixner > > No changelog? Bah. This one should not be there at all. > Anyway, why do we care about the number of decriptors? >> +/** >> + * msi_device_num_descs - Query the number of allocated MSI descriptors of a device >> + * @dev: The device to read from >> + * >> + * Note: This is a lockless snapshot of msi_device_data::num_descs >> + * >> + * Returns the number of MSI descriptors which are allocated for @dev >> + */ >> +unsigned int msi_device_num_descs(struct device *dev) >> +{ >> + if (dev->msi.data) >> + return dev->msi.data->num_descs; > > As this number can change after it is read, what will callers do with > it? I wanted to get rid of this, but then forgot. Getting old. Thanks, tglx