Commit 5fd11be5 authored by Martin Dalecki's avatar Martin Dalecki Committed by Linus Torvalds

[PATCH] kill warnings 6/19

- Fix compilation warnings in cfbimgblt.c.

- Fix improper __FUNCTION__ usage in smb_debug.h.

It's all about giving the compiler a chance to coalesce
equal string constants - a good reason for the
C language standard to depricate the old semantics.
parent 9c898c36
...@@ -43,12 +43,14 @@ ...@@ -43,12 +43,14 @@
void cfb_imageblit(struct fb_info *p, struct fb_image *image) void cfb_imageblit(struct fb_info *p, struct fb_image *image)
{ {
int pad, ppw, shift, shift_right, shift_left, x2, y2, n, i, j, k, l = 7; int pad, ppw;
int x2, y2, n, i, j, k, l = 7;
unsigned long tmp = ~0 << (BITS_PER_LONG - p->var.bits_per_pixel); unsigned long tmp = ~0 << (BITS_PER_LONG - p->var.bits_per_pixel);
unsigned long fgx, bgx, fgcolor, bgcolor, eorx; unsigned long fgx, bgx, fgcolor, bgcolor, eorx;
unsigned long end_index, end_mask; unsigned long end_mask;
unsigned long *dst = NULL; unsigned long *dst = NULL;
u8 *dst1, *src; u8 *dst1;
u8 *src;
/* /*
* We could use hardware clipping but on many cards you get around hardware * We could use hardware clipping but on many cards you get around hardware
...@@ -98,7 +100,7 @@ void cfb_imageblit(struct fb_info *p, struct fb_image *image) ...@@ -98,7 +100,7 @@ void cfb_imageblit(struct fb_info *p, struct fb_image *image)
end_mask = 0; end_mask = 0;
for (k = ppw; k > 0; k--) { for (k = ppw; k > 0; k--) {
if (test_bit(l, src)) if (test_bit(l, (unsigned long *) src))
end_mask |= (tmp >> (p->var.bits_per_pixel*(k-1))); end_mask |= (tmp >> (p->var.bits_per_pixel*(k-1)));
l--; l--;
if (l < 0) { l = 7; src++; } if (l < 0) { l = 7; src++; }
...@@ -110,7 +112,7 @@ void cfb_imageblit(struct fb_info *p, struct fb_image *image) ...@@ -110,7 +112,7 @@ void cfb_imageblit(struct fb_info *p, struct fb_image *image)
if (n) { if (n) {
end_mask = 0; end_mask = 0;
for (j = n; j > 0; j--) { for (j = n; j > 0; j--) {
if (test_bit(l, src)) if (test_bit(l, (unsigned long *) src))
end_mask |= (tmp >> (p->var.bits_per_pixel*(j-1))); end_mask |= (tmp >> (p->var.bits_per_pixel*(j-1)));
l--; l--;
if (l < 0) { l = 7; src++; } if (l < 0) { l = 7; src++; }
......
...@@ -11,16 +11,16 @@ ...@@ -11,16 +11,16 @@
* these are normally enabled. * these are normally enabled.
*/ */
#ifdef SMBFS_PARANOIA #ifdef SMBFS_PARANOIA
#define PARANOIA(x...) printk(KERN_NOTICE __FUNCTION__ ": " x) # define PARANOIA(f, a...) printk(KERN_NOTICE "%s: " f, __FUNCTION__, ## a)
#else #else
#define PARANOIA(x...) do { ; } while(0) # define PARANOIA(f, a...) do { ; } while(0)
#endif #endif
/* lots of debug messages */ /* lots of debug messages */
#ifdef SMBFS_DEBUG_VERBOSE #ifdef SMBFS_DEBUG_VERBOSE
#define VERBOSE(x...) printk(KERN_DEBUG __FUNCTION__ ": " x) # define VERBOSE(f, a...) printk(KERN_DEBUG "%s: " f, __FUNCTION__, ## a)
#else #else
#define VERBOSE(x...) do { ; } while(0) # define VERBOSE(f, a...) do { ; } while(0)
#endif #endif
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment