Skip to content

Commit 5aaffc6

Browse files
cladischStefan Richter
authored andcommitted
firewire: core: rename some variables
In manage_channel(), rename the variables "c" and "i" to the more expressive "bit" and "channel". Signed-off-by: Clemens Ladisch <clemens@ladisch.de> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
1 parent 8fd2af1 commit 5aaffc6

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

‎drivers/firewire/core-iso.c‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -235,45 +235,45 @@ static int manage_bandwidth(struct fw_card *card, int irm_id, int generation,
235235
static int manage_channel(struct fw_card *card, int irm_id, int generation,
236236
u32 channels_mask, u64 offset, bool allocate, __be32 data[2])
237237
{
238-
__be32 c, all, old;
239-
int i, ret = -EIO, retry = 5;
238+
__be32 bit, all, old;
239+
int channel, ret = -EIO, retry = 5;
240240

241241
old = all = allocate ? cpu_to_be32(~0) : 0;
242242

243-
for (i = 0; i < 32; i++) {
244-
if (!(channels_mask & 1 << i))
243+
for (channel = 0; channel < 32; channel++) {
244+
if (!(channels_mask & 1 << channel))
245245
continue;
246246

247247
ret = -EBUSY;
248248

249-
c = cpu_to_be32(1 << (31 - i));
250-
if ((old & c) != (all & c))
249+
bit = cpu_to_be32(1 << (31 - channel));
250+
if ((old & bit) != (all & bit))
251251
continue;
252252

253253
data[0] = old;
254-
data[1] = old ^ c;
254+
data[1] = old ^ bit;
255255
switch (fw_run_transaction(card, TCODE_LOCK_COMPARE_SWAP,
256256
irm_id, generation, SCODE_100,
257257
offset, data, 8)) {
258258
case RCODE_GENERATION:
259259
/* A generation change frees all channels. */
260-
return allocate ? -EAGAIN : i;
260+
return allocate ? -EAGAIN : channel;
261261

262262
case RCODE_COMPLETE:
263263
if (data[0] == old)
264-
return i;
264+
return channel;
265265

266266
old = data[0];
267267

268268
/* Is the IRM 1394a-2000 compliant? */
269-
if ((data[0] & c) == (data[1] & c))
269+
if ((data[0] & bit) == (data[1] & bit))
270270
continue;
271271

272272
/* 1394-1995 IRM, fall through to retry. */
273273
default:
274274
if (retry) {
275275
retry--;
276-
i--;
276+
channel--;
277277
} else {
278278
ret = -EIO;
279279
}

0 commit comments

Comments
 (0)