[PATCH] USB: FIX bitfield istl_flip:1, make it unsigned.

[PATCH] USB: FIX bitfield istl_flip:1, make it unsigned.

Post by Mike Frysi » Fri, 20 Nov 2009 00:20:02



makes sense to me (both changes).
Acked-by: Mike Frysinger < XXXX@XXXXX.COM >
-mike
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to XXXX@XXXXX.COM
More majordomo info at http://www.yqcomputer.com/
Please read the FAQ at http://www.yqcomputer.com/
 
 
 

1. Patch to Fix Patched Fix Patched with Fixed Patch Fix Patcher

2. typecasting a bitfield to unsigned long long

hi Gurus

I'm a newbie learning C.
I've a question, relevant code snippet is as follows :

typedef unsigned long long ulonglong;

struct foo {
unsigned dummy : 2;
unsigned n : 24;
unsigned c : 3;
unsigned d : 1;
unsigned v : 1;
unsigned g : 1;
};

ulonglong func_foo(void) {
ulonglong addr;
struct foo entry;

/* code that populates entry snipped*/

addr = entry.n << 12;
.
.
}

This caused sign extended value in addr which is not we want.
Would the following be a good fix or clc gurus have a better suggestion?

addr = ((ulonglong)entry.n) << 12;

I'm concerned that there is more to it than what I feel the fix is.

Thanks in advance
- Sushil

3. [PATCH] USB: move usb core to use class_simple instead of it's own class functions.

4. M/S Sasser patch made things worse, need fix for fix

5. [PATCH 1-fix/4] Fix extend notifier_call_chain to count nr_calls made.

6. [PATCH] USB: fix build warning in usb core as pointed out by Andrew.

7. [PATCH] Fix USB vendor and product IDs endianness for USB HID devices

8. [linux-usb-devel] [GIT PATCH] USB fixes for 2.6.20-rc5

9. [PATCH] Fix USB vendor and product IDs endianness for USB HID devices

10. [linux-usb-devel] [PATCH] USB: Fix masking bug initialization of Freescale EHCI controller

11. [PATCH 2/3] ufs: truncate negative to unsigned fix

12. [linux-usb-devel] [2.6 patch] USB rio500.c: fix check-after-use

13. [PATCH 2.6] clean-up: fixes "unsigned>=0" warning

14. [PATCH 1/2] USB: drivers/usb/atm/usb_atm.c: fix nonzero snd_padding case

15. [DVB patch 41/51] usb: digitv-usb fixes