Skip to contentSkip to conversation

s5-mfc: remove meaningless memory bank assignment

PATCH Superseded Seung-Woo Kim 2 participants 7 messages Mar 5, 2014 – Mar 6, 2014 1 message not in the archive Media (V4L/DVB)

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): 187b01cf385bb9b4510$%[email protected]

#1 lore raw

PATCH 1/1 s5-mfc: remove meaningless memory bank assignment

There was assignment of memory bank with dma address converted from physical address. But allocation has been changed with dma function, so the assignment is not necessary.

---
change from v1
- fixes subject and adds proper description

---
 drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c +0 -2
index 2475a3c..ee05f2d 100644
@@ -44,8 +44,6 @@ int s5p_mfc_alloc_firmware(struct s5p_mfc_dev *dev)
 		return -ENOMEM;
 	}
 
-	dev->bank1 = dev->bank1;
-
 	if (HAS_PORTNUM(dev) && IS_TWOPORT(dev)) {
 		bank2_virt = dma_alloc_coherent(dev->mem_dev_r, 1 << MFC_BASE_ALIGN_ORDER,
 					&bank2_dma_addr, GFP_KERNEL);
Signature · 1 line
1.7.4.1
#2 lore raw
Quoted 17 lines · Seung-Woo Kim

There was assignment of memory bank with dma address converted from physical address. But allocation has been changed with dma function, so the assignment is not necessary.

---
change from v1
- fixes subject and adds proper description

---
 drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c +0 -0
index 2475a3c..ee05f2d 100644

drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c int s5p_mfc_alloc_firmware(struct s5p_mfc_dev *dev) · line 47

Quoted 4 lines
drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c +0 -1
@@ -44,8 +44,6 @@ int s5p_mfc_alloc_firmware(struct s5p_mfc_dev *dev)
                return -ENOMEM;
        }
 
-       dev->bank1 = dev->bank1;

Are you sure this isn't some kind of typo? If not then your commit description is too verbose
to actually say that the code is redundant and could be removed. The code here is something like

a = a;

which does not make sense nor add any value and hence redundant and could be removed.

Signature · 2 lines
With warm regards,
Sachin
#3 lore raw

Hello Sachin,

Quoted 1 line · Sachin Kamat

On 5 March 2014 16:38, Seung-Woo Kim <[email protected]> wrote:

(...)

Quoted 11 lines
Quoted 1 line

- dev->bank1 = dev->bank1;

Are you sure this isn't some kind of typo? If not then your commit description is too verbose
to actually say that the code is redundant and could be removed. The code here is something like

a = a;

which does not make sense nor add any value and hence redundant and could be removed.

Right, this meaningless code can be simply removed as like the first version. Anyway this redundant made from change of address type in earlier patch. So I tried to describe that.

Regards,
- Seung-Woo Kim

Signature · 3 lines
Seung-Woo Kim
Samsung Software R&D Center
--
#4 lore raw

Hi Seung-Woo,

Quoted 14 lines · Seung-Woo Kim

Hello Sachin,

Quoted 1 line · Sachin Kamat

On 5 March 2014 16:38, Seung-Woo Kim <[email protected]> wrote:

(...)

Quoted 7 lines
Quoted 1 line

- dev->bank1 = dev->bank1;

Are you sure this isn't some kind of typo? If not then your commit description is too verbose
to actually say that the code is redundant and could be removed. The code here is something like

Quoted 8 lines
Quoted 4 lines

a = a;

which does not make sense nor add any value and hence redundant and could be removed.

Right, this meaningless code can be simply removed as like the first version. Anyway this redundant made from change of address type in earlier patch. So I tried to describe that.

What Kamil meant was that it is not a good practice to leave the commit description
blank however trivial the patch might be. So a single line stating the obvious should
be sufficient in this case.

Signature · 2 lines
With warm regards,
Sachin
#5 lore raw

Hello Sachin,

Quoted 26 lines · Sachin Kamat

Hi Seung-Woo,

Quoted 14 lines · Seung-Woo Kim

Hello Sachin,

Quoted 1 line · Sachin Kamat

On 5 March 2014 16:38, Seung-Woo Kim <[email protected]> wrote:

(...)

Quoted 7 lines
Quoted 1 line

- dev->bank1 = dev->bank1;

Are you sure this isn't some kind of typo? If not then your commit description is too verbose
to actually say that the code is redundant and could be removed. The code here is something like

Quoted 8 lines
Quoted 4 lines

a = a;

which does not make sense nor add any value and hence redundant and could be removed.

Right, this meaningless code can be simply removed as like the first version. Anyway this redundant made from change of address type in earlier patch. So I tried to describe that.

Quoted 6 lines

What Kamil meant was that it is not a good practice to leave the commit description
blank however trivial the patch might be. So a single line stating the obvious should
be sufficient in this case.

Ok, I will re-send with just simple statement.

Thanks,
- Seung-Woo Kim

Signature · 3 lines
Seung-Woo Kim
Samsung Software R&D Center
--
#6 lore raw

PATCH v3 1/1 s5p-mfc: remove meaningless memory bank assignment

In reply to Sachin Kamat

This patch removes meaningless assignment of memory bank to itself.

---
change from v2
- simplify description and change typo in subject
change from v1
- fixes subject and adds proper description

---
 drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
drivers/media/platform/s5p-mfc/s5p_mfc_ctrl.c +0 -2
index 2475a3c..ee05f2d 100644
@@ -44,8 +44,6 @@ int s5p_mfc_alloc_firmware(struct s5p_mfc_dev *dev)
 		return -ENOMEM;
 	}
 
-	dev->bank1 = dev->bank1;
-
 	if (HAS_PORTNUM(dev) && IS_TWOPORT(dev)) {
 		bank2_virt = dma_alloc_coherent(dev->mem_dev_r, 1 << MFC_BASE_ALIGN_ORDER,
 					&bank2_dma_addr, GFP_KERNEL);
Signature · 1 line
1.7.4.1