* [Qemu-devel] [PATCH 1/2] Hw: char: Remove unnecessary variable
@ 2015-09-25 14:36 Shraddha Barke
2015-09-25 14:36 ` [Qemu-devel] [PATCH 2/2] Hw: timer: " Shraddha Barke
2015-10-03 17:01 ` [Qemu-devel] [PATCH 1/2] Hw: char: " Michael Tokarev
0 siblings, 2 replies; 6+ messages in thread
From: Shraddha Barke @ 2015-09-25 14:36 UTC (permalink / raw)
To: Edgar E. Iglesias, qemu-trivial, Michael Tokarev
Cc: qemu-devel, Shraddha Barke
Compress lines and remove the variable.
Change made using Coccinelle script
@@
expression ret;
@@
- if (ret) return ret;
- return 0;
+ return ret;
@@
local idexpression ret;
expression e;
@@
- ret = e;
- return ret;
+ return e;
@@
type T; identifier i;
@@
- T i;
... when != i
Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
---
hw/char/etraxfs_ser.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/char/etraxfs_ser.c b/hw/char/etraxfs_ser.c
index 857c136..562021e 100644
--- a/hw/char/etraxfs_ser.c
+++ b/hw/char/etraxfs_ser.c
@@ -182,15 +182,13 @@ static void serial_receive(void *opaque, const uint8_t *buf, int size)
static int serial_can_receive(void *opaque)
{
ETRAXSerial *s = opaque;
- int r;
/* Is the receiver enabled? */
if (!(s->regs[RW_REC_CTRL] & (1 << 3))) {
return 0;
}
- r = sizeof(s->rx_fifo) - s->rx_fifo_len;
- return r;
+ return sizeof(s->rx_fifo) - s->rx_fifo_len;
}
static void serial_event(void *opaque, int event)
--
2.1.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Qemu-devel] [PATCH 2/2] Hw: timer: Remove unnecessary variable
2015-09-25 14:36 [Qemu-devel] [PATCH 1/2] Hw: char: Remove unnecessary variable Shraddha Barke
@ 2015-09-25 14:36 ` Shraddha Barke
2015-10-03 16:59 ` Michael Tokarev
2015-10-03 17:01 ` [Qemu-devel] [PATCH 1/2] Hw: char: " Michael Tokarev
1 sibling, 1 reply; 6+ messages in thread
From: Shraddha Barke @ 2015-09-25 14:36 UTC (permalink / raw)
To: Edgar E. Iglesias, qemu-trivial, Michael Tokarev
Cc: qemu-devel, Shraddha Barke
Compress lines and remove the variable.
Change made using Coccinelle script
@@
expression ret;
@@
- if (ret) return ret;
- return 0;
+ return ret;
@@
local idexpression ret;
expression e;
@@
- ret = e;
- return ret;
+ return e;
@@
type T; identifier i;
@@
- T i;
... when != i
Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com>
---
hw/timer/m48t59.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/timer/m48t59.c b/hw/timer/m48t59.c
index 8ab683d..b3df8f9 100644
--- a/hw/timer/m48t59.c
+++ b/hw/timer/m48t59.c
@@ -590,10 +590,8 @@ static void nvram_writel (void *opaque, hwaddr addr, uint32_t value)
static uint32_t nvram_readb (void *opaque, hwaddr addr)
{
M48t59State *NVRAM = opaque;
- uint32_t retval;
- retval = m48t59_read(NVRAM, addr);
- return retval;
+ return m48t59_read(NVRAM, addr);
}
static uint32_t nvram_readw (void *opaque, hwaddr addr)
--
2.1.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH 2/2] Hw: timer: Remove unnecessary variable
2015-09-25 14:36 ` [Qemu-devel] [PATCH 2/2] Hw: timer: " Shraddha Barke
@ 2015-10-03 16:59 ` Michael Tokarev
2015-10-05 15:29 ` Eric Blake
0 siblings, 1 reply; 6+ messages in thread
From: Michael Tokarev @ 2015-10-03 16:59 UTC (permalink / raw)
To: Shraddha Barke, Edgar E. Iglesias, qemu-trivial; +Cc: qemu-devel
25.09.2015 17:36, Shraddha Barke wrote:
> Compress lines and remove the variable.
Applied to -trivial, removing the Coccinelle script
from the commit message.
Thanks,
/mjt
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH 2/2] Hw: timer: Remove unnecessary variable
2015-10-03 16:59 ` Michael Tokarev
@ 2015-10-05 15:29 ` Eric Blake
2015-10-08 16:45 ` Michael Tokarev
0 siblings, 1 reply; 6+ messages in thread
From: Eric Blake @ 2015-10-05 15:29 UTC (permalink / raw)
To: Michael Tokarev, Shraddha Barke, Edgar E. Iglesias, qemu-trivial
Cc: qemu-devel
[-- Attachment #1: Type: text/plain, Size: 555 bytes --]
On 10/03/2015 10:59 AM, Michael Tokarev wrote:
> 25.09.2015 17:36, Shraddha Barke wrote:
>> Compress lines and remove the variable.
>
> Applied to -trivial, removing the Coccinelle script
> from the commit message.
Why cripple the commit message? The coccinelle recipe is useful for
someone trying to backport the script to a different branch where a
straight backport doesn't quite work, but rerunning the coccinelle
recipe does.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH 2/2] Hw: timer: Remove unnecessary variable
2015-10-05 15:29 ` Eric Blake
@ 2015-10-08 16:45 ` Michael Tokarev
0 siblings, 0 replies; 6+ messages in thread
From: Michael Tokarev @ 2015-10-08 16:45 UTC (permalink / raw)
To: Eric Blake, Shraddha Barke, Edgar E. Iglesias, qemu-trivial; +Cc: qemu-devel
05.10.2015 18:29, Eric Blake wrote:
> On 10/03/2015 10:59 AM, Michael Tokarev wrote:
>> 25.09.2015 17:36, Shraddha Barke wrote:
>>> Compress lines and remove the variable.
>>
>> Applied to -trivial, removing the Coccinelle script
>> from the commit message.
>
> Why cripple the commit message? The coccinelle recipe is useful for
> someone trying to backport the script to a different branch where a
> straight backport doesn't quite work, but rerunning the coccinelle
> recipe does.
I already answered to this one. Becuase git commit messages
are not a good place to store various good scripts and recipes
like this, and these scripts wont be found there anyway. On
the other hand, cluttering commit messages with such info makes
is significantly more difficult to find changes when you look for
breakage or actual changes somewhere.
Additionally, your point about backporting is kind of moot, there's
very very little reason to backport these changes (especially using
the supplied script), and if the backporting is really necessary
and the patch does not apply (which is twice unlikely) it is much
easier to do the patching manually based on the very smal difference
here.
Thanks,
/mjt
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH 1/2] Hw: char: Remove unnecessary variable
2015-09-25 14:36 [Qemu-devel] [PATCH 1/2] Hw: char: Remove unnecessary variable Shraddha Barke
2015-09-25 14:36 ` [Qemu-devel] [PATCH 2/2] Hw: timer: " Shraddha Barke
@ 2015-10-03 17:01 ` Michael Tokarev
1 sibling, 0 replies; 6+ messages in thread
From: Michael Tokarev @ 2015-10-03 17:01 UTC (permalink / raw)
To: Shraddha Barke, Edgar E. Iglesias, qemu-trivial; +Cc: qemu-devel
25.09.2015 17:36, Shraddha Barke wrote:
> Compress lines and remove the variable.
Applied to -trivial, removing the Coccinelle script
from the commit message.
Thanks!
/mjt
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-10-08 16:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-25 14:36 [Qemu-devel] [PATCH 1/2] Hw: char: Remove unnecessary variable Shraddha Barke
2015-09-25 14:36 ` [Qemu-devel] [PATCH 2/2] Hw: timer: " Shraddha Barke
2015-10-03 16:59 ` Michael Tokarev
2015-10-05 15:29 ` Eric Blake
2015-10-08 16:45 ` Michael Tokarev
2015-10-03 17:01 ` [Qemu-devel] [PATCH 1/2] Hw: char: " Michael Tokarev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).