Use new helper pci_dev_id() to simplify the code.
Signed-off-by: Heiner Kallweit
---
drivers/net/ethernet/realtek/r8169.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/realtek/r8169.c
b/drivers/net/ethernet/realtek/r8169.c
index efaea1a0a..ae476fe8d
Use new helper pci_dev_id() to simplify the code.
Signed-off-by: Heiner Kallweit
---
drivers/pci/msi.c| 6 +++---
drivers/pci/search.c | 10 +++---
2 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 73986825d..e039b740f 100644
In several places in the kernel we find PCI_DEVID used like this:
PCI_DEVID(dev->bus->number, dev->devfn) Therefore create a helper
for it.
Signed-off-by: Heiner Kallweit
---
include/linux/pci.h | 5 +
1 file changed, 5 insertions(+)
diff --git a/include/linux/pci.h b/include/li
In several places in the kernel we find PCI_DEVID used like this:
PCI_DEVID(dev->bus->number, dev->devfn) Therefore create a helper
for it.
v2:
- apply the change to all affected places in the kernel
Heiner Kallweit (9):
PCI: add helper pci_dev_id
PCI: use helper pci_dev_id
r8169
Use new helper pci_dev_id() to simplify the code.
Signed-off-by: Heiner Kallweit
---
arch/powerpc/platforms/powernv/npu-dma.c | 14 ++
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/arch/powerpc/platforms/powernv/npu-dma.c
b/arch/powerpc/platforms/powernv/npu-dma.c
Use new helper pci_dev_id() to simplify the code.
Signed-off-by: Heiner Kallweit
---
drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
index
Use new helper pci_dev_id() to simplify the code.
Signed-off-by: Heiner Kallweit
---
drivers/iommu/amd_iommu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index f467cc4b4..5cb201422 100644
--- a/drivers/iommu
Use new helper pci_dev_id() to simplify the code.
Signed-off-by: Heiner Kallweit
---
drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
b/drivers/net/ethernet/stmicro/stmmac
Use new helper pci_dev_id() to simplify the code.
Signed-off-by: Heiner Kallweit
---
drivers/iommu/intel-iommu.c | 2 +-
drivers/iommu/intel_irq_remapping.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
Use new helper pci_dev_id() to simplify the code.
Signed-off-by: Heiner Kallweit
---
drivers/platform/chrome/chromeos_laptop.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/chrome/chromeos_laptop.c
b/drivers/platform/chrome/chromeos_laptop.c
index
Not necessarily a big leap for mankind, but using bit macros makes
the code better readable, especially the definition of DMA_BIT_MASK
is more intuitive.
Signed-off-by: Heiner Kallweit
---
include/linux/dma-mapping.h | 21 +++--
1 file changed, 11 insertions(+), 10 deletions
nly if something is really very unlikely.
I think that's the case here.
Patch was created with some help from coccinelle.
@@
expression dev, dma_addr;
@@
- unlikely(dma_mapping_error(dev, dma_addr))
+ dma_mapping_error(dev, dma_addr)
Signed-off-by: Heiner Kallweit
---
If ok, then tbd through wh
Zillions of drivers use the unlikely() hint when checking the result of
dma_mapping_error(). This is an inline function anyway, so we can move
the hint into this function and remove it from drivers.
Signed-off-by: Heiner Kallweit
---
v2:
Split the big patch into the change for dma-mapping.h
Am 13.12.2020 um 22:27 schrieb Song Bao Hua (Barry Song):
>
>
>> -Original Message-----
>> From: Heiner Kallweit [mailto:hkallwe...@gmail.com]
>> Sent: Monday, December 14, 2020 5:33 AM
>> To: Christoph Hellwig ; Marek Szyprowski
>> ; Robin Murphy ; Song
On 14.12.2020 14:01, Robin Murphy wrote:
> On 2020-12-13 16:32, Heiner Kallweit wrote:
>> Zillions of drivers use the unlikely() hint when checking the result of
>> dma_mapping_error(). This is an inline function anyway, so we can move
>> the hint into this function and r
Zillions of drivers use the unlikely() hint when checking the result of
dma_mapping_error(). This is an inline function anyway, so we can move
the hint into the function and remove it from drivers over time.
Signed-off-by: Heiner Kallweit
---
This is a resend of a patch from Dec 2020 when I
On 30.03.2021 12:21, Robin Murphy wrote:
> On 2021-03-26 21:03, Heiner Kallweit wrote:
>> Zillions of drivers use the unlikely() hint when checking the result of
>> dma_mapping_error(). This is an inline function anyway, so we can move
>> the hint into the function and remove
On 26.03.2021 22:03, Heiner Kallweit wrote:
> Zillions of drivers use the unlikely() hint when checking the result of
> dma_mapping_error(). This is an inline function anyway, so we can move
> the hint into the function and remove it from drivers over time.
>
> Signed-off-by:
The init function ensures that iommu_group_kset can't be NULL.
Therefore this check isn't needed.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.com>
---
drivers/iommu/iommu.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index b
If kset_create_and_add fails then most likely due to out-of-memory.
There's not necessarily a bug somewhere.
Therefore I think we shouldn't use BUG_ON and simply return -ENOMEM.
That's also what other callers of kset_create_and_add do.
Signed-off-by: Heiner Kallweit <hkallwe...@gmail.
Am 28.06.2016 um 22:09 schrieb Alex Williamson:
> On Tue, 28 Jun 2016 20:40:37 +0200
> Heiner Kallweit <hkallwe...@gmail.com> wrote:
>
>> The init function ensures that iommu_group_kset can't be NULL.
>> Therefore this check isn't needed.
>
> Have you seen your p
Am 04.07.2016 um 13:46 schrieb Joerg Roedel:
> On Wed, Jun 29, 2016 at 09:13:59PM +0200, Heiner Kallweit wrote:
>> Ida handling can be much simplified by using the ida_simple_.. functions.
>>
>> This change also fixes the bug that previously checking for errors
>&
Am 29.06.2016 um 00:07 schrieb Alex Williamson:
> On Tue, 28 Jun 2016 23:37:06 +0200
> Heiner Kallweit <hkallwe...@gmail.com> wrote:
>
>> Am 28.06.2016 um 22:09 schrieb Alex Williamson:
>>> On Tue, 28 Jun 2016 20:40:37 +0200
>>> Heiner Kallweit <hkallwe
Ida handling can be much simplified by using the ida_simple_.. functions.
This change also fixes the bug that previously checking for errors
returned by ida_get_new() was incomplete.
ida_get_new() can return errors other than EAGAIN, e.g. ENOSPC.
This case wasn't handled.
Signed-off-by: Heiner
24 matches
Mail list logo