From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 56B4F17084F for ; Wed, 13 Nov 2024 16:11:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731514308; cv=none; b=kJcgPMAZDS40gFjqWMRi6WDSK+5jaZ7ZHHFixHaaKo0X7IKBaKDaulCLmV2I+leSnWQ7yzNmmk0vv7KZ/8eRchBgCyHxSxhPCZsX3lu6S8RyLqj2Zkde+QgkH89GKvcGK60erAd9k6K7GeupEU9ag2f1E35EAvQWLF2zGbe8b/c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731514308; c=relaxed/simple; bh=8JShsxBODe/ZYse/45GbByklsWCzNPukdA1ZXffLLLQ=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=SJJoJenOtbZo3GoPg9XBQnRuv3blzpBAXoeJQgBbzids1wCWmktuvB1+rzRGj5bocZSR/Sg4zzCwuDWKtHG7VuKizy098W5GvZEs5PFWyfjA9UcMA/XqnMNnTacNpVS7cXMOTBMB9o63gGDaOBeJX6sHttlP6RkuJfQarXRtpCA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=SFU1h/Mw; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="SFU1h/Mw" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1731514305; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8JShsxBODe/ZYse/45GbByklsWCzNPukdA1ZXffLLLQ=; b=SFU1h/Mwr7lIShqUGeYhB3lrs/uUp0HY161hgBtSN0ff/Z2hRKt25aHM2/4qwLMRRETThb E7jlOoMTD/bCMQAfVVnK6bP3eYh+zjrGuYSvjzDDb/QAOCq4lzTDv/BkoeSLI7mGKP5CM5 U3uevNOjLemhJZRrm3u13v0aL0rdd0Q= Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-149-e4hxc6ZxOxK2RfN7_n_WDQ-1; Wed, 13 Nov 2024 11:11:41 -0500 X-MC-Unique: e4hxc6ZxOxK2RfN7_n_WDQ-1 X-Mimecast-MFC-AGG-ID: e4hxc6ZxOxK2RfN7_n_WDQ Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-6d38310949cso117695456d6.0 for ; Wed, 13 Nov 2024 08:11:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731514301; x=1732119101; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=8JShsxBODe/ZYse/45GbByklsWCzNPukdA1ZXffLLLQ=; b=rIyLQJ6LQcRCM5hPEDhWn+4T1IK7mAbijmLec2Iobh6WCjOP+FS0HtpN84JtTfPQFy Ro5tzit+ow+Kr+gbai40GvnW2dYf8o7cYA+9lsxsAvqpBHbLbK/VbNFb7nKb5ylTa/uq Byi7QMDylMAj/PXs4oOerVZLV1EnyFwQl+KD9p7zrR6NhHNKgfZB1KQOPW0c6J/ijS10 7Yyj8xXiBkTQts6R5AVQ1Mxil/4k7Jrzb0MJgL+VM+hQeqgP0L5tCPptdUZmOechJoBv FOEdPMWzRheU2yYfDnXOBbPC703wUv3+hfZL4H26A/mhVbBVn4zJaf5oaiZRI0hSqWLS LKsg== X-Forwarded-Encrypted: i=1; AJvYcCVMLohYstebrpya49gdpqLWx/9VT2OXjgSlO3RbA7S9RIRwkvgF/xHj4C9rIfcReZAA7JoeWC0=@vger.kernel.org X-Gm-Message-State: AOJu0Yzw2sBQAL6CeOzDUVxxuplUEDygDRnEwxZnO4ANH61PoAs1nrem i2IJrdylJiUYO46o4mjijXXHD7l1BPlBak/5FfVh8AdQvBiS3/n21SSQBSuNwwbfyMg6hvooAHw kCyE9vFUF026hDc7a70edxsAGaxoyYj5eQCREGQOkOX9xzqOM1AZQqQ== X-Received: by 2002:a05:6214:5987:b0:6d3:68df:f62d with SMTP id 6a1803df08f44-6d39e10946emr297207526d6.2.1731514300783; Wed, 13 Nov 2024 08:11:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IHnbeg7ogUgcEGRAzWAPJHQLp75DRK8IjefSxWG9p6JZ9o7VJOC4JF6vdJYqufewnJd395bRA== X-Received: by 2002:a05:6214:5987:b0:6d3:68df:f62d with SMTP id 6a1803df08f44-6d39e10946emr297207096d6.2.1731514300322; Wed, 13 Nov 2024 08:11:40 -0800 (PST) Received: from [10.200.68.91] (nat-pool-muc-u.redhat.com. [149.14.88.27]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6d3966303e6sm86017386d6.99.2024.11.13.08.11.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Nov 2024 08:11:39 -0800 (PST) Message-ID: <2f94dd0f0bfef8d51f1ced78a9b5db8e2ce48429.camel@redhat.com> Subject: Re: [PATCH v2 01/11] PCI: Prepare removing devres from pci_intx() From: Philipp Stanner To: Thomas Gleixner , Damien Le Moal , Niklas Cassel , Basavaraj Natikar , Jiri Kosina , Benjamin Tissoires , Arnd Bergmann , Greg Kroah-Hartman , Alex Dubov , Sudarsana Kalluru , Manish Chopra , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rasesh Mody , GR-Linux-NIC-Dev@marvell.com, Igor Mitsyanko , Sergey Matyukevich , Kalle Valo , Sanjay R Mehta , Shyam Sundar S K , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Alex Williamson , Juergen Gross , Stefano Stabellini , Oleksandr Tyshchenko , Mario Limonciello , Chen Ni , Ricky Wu , Al Viro , Breno Leitao , Kevin Tian , Mostafa Saleh , Andy Shevchenko , Jason Gunthorpe , Yi Liu , Kunwu Chan , Ankit Agrawal , Christian Brauner , Reinette Chatre , Eric Auger , Ye Bin Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, kvm@vger.kernel.org, xen-devel@lists.xenproject.org Date: Wed, 13 Nov 2024 17:11:29 +0100 In-Reply-To: <87plmzktn3.ffs@tglx> References: <20241113124158.22863-2-pstanner@redhat.com> <20241113124158.22863-3-pstanner@redhat.com> <87plmzktn3.ffs@tglx> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.52.4 (3.52.4-2.fc40) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Wed, 2024-11-13 at 17:04 +0100, Thomas Gleixner wrote: > On Wed, Nov 13 2024 at 13:41, Philipp Stanner wrote: > > +/** > > + * pci_intx_unmanaged - enables/disables PCI INTx for device dev, > > + * unmanaged version > > + * @pdev: the PCI device to operate on > > + * @enable: boolean: whether to enable or disable PCI INTx >=20 > Except that the argument is of type int, which really should be type > bool. True, but this is a *temporary* copy of pci_intx(), a ~16 year old function. Older C programmers had the habit of for some reason using 32-bit integers for a true/false boolean all the time. We _could_ think of changing pci_intx()'s parameter to a boolean, but I think it wouldn't really improve things very much see also below >=20 > > + * Enables/disables PCI INTx for device @pdev > > + * > > + * This function behavios identically to pci_intx(), but is never > > managed with > > + * devres. >=20 > behavios? -> behaves. Will fix. >=20 > > + */ > > +void pci_intx_unmanaged(struct pci_dev *pdev, int enable) >=20 > I find this function name mildy confusing. This _unmanaged suffix is > not > really telling me anything. And the reference that this behaves > identically to pci_intx() makes it even worse. >=20 > This function is about controlling the PCI INTX_DISABLE bit in the > PCI_COMMAND config word, right? >=20 > So naming it pci_intx_control() would make it entirely clear what > this > is about, no? We had this conversation last week. I answered on that already, maybe you have overlooked it: https://lore.kernel.org/all/a8d9f32f60f55c58d79943c4409b8b94535ff853.camel@= redhat.com/ Please also take a look at patch 11, then you'll see the full picture Danke, Philipp >=20 > Thanks, >=20 > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 tglx >=20