From patchwork Mon May 23 10:58:07 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Petter Selasky X-Patchwork-Id: 808202 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4NAxO5G005228 for ; Mon, 23 May 2011 10:59:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751725Ab1EWK7W (ORCPT ); Mon, 23 May 2011 06:59:22 -0400 Received: from mailfe01.c2i.net ([212.247.154.2]:51740 "EHLO swip.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751116Ab1EWK7W (ORCPT ); Mon, 23 May 2011 06:59:22 -0400 X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=1W/zHQV/91afZrGZjnmxK4mmm0xPtKVmshL3njyU5IE= c=1 sm=1 a=Mp37MWeA6ooA:10 a=WQU8e4WWZSUA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=SObZXD9RMCsnjX8LmoMA:9 a=CjuIK1q_8ugA:10 a=8kQB0OdkAAAA:8 a=A2QRPmBw2PhzkPscF7AA:9 a=3KEyGfWgpXpV43jO4pYA:7 a=wPNLvfGTeEIA:10 a=9aOQ2cSd83gA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mailfe01.swip.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.1 X-TFF-CGPSA-Version: 1.7 X-T2-CGPSA-Filter: Scanned Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe01.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 130881250; Mon, 23 May 2011 12:59:18 +0200 To: "linux-media@vger.kernel.org" Subject: [PATCH] The info and err macros are already defined by the USB stack. Rename these macros to avoid macro redefinition warnings. Cc: Mauro Carvalho Chehab From: Hans Petter Selasky X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq,NwSZ4V" =?iso-8859-15?q?=7CLR=2E+tj=7Dg5=0A=09=25V?=,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( =?iso-8859-15?q?=0A=09=3AAuzV9=3A=2EhESm-x4h240C=609=3Dw?= Date: Mon, 23 May 2011 12:58:07 +0200 MIME-Version: 1.0 Message-Id: <201105231258.07403.hselasky@c2i.net> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Mon, 23 May 2011 10:59:26 +0000 (UTC) --HPS From 83b2408914b9c02600c8288459ed869037efd1dd Mon Sep 17 00:00:00 2001 From: Hans Petter Selasky Date: Mon, 23 May 2011 12:54:21 +0200 Subject: [PATCH] The info and err macros are already defined by the USB stack. Rename these macros to avoid macro redefinition warnings. Signed-off-by: Hans Petter Selasky --- drivers/media/dvb/frontends/cx24123.c | 34 +++++++++++++------------- drivers/media/dvb/frontends/dib3000mb.c | 12 ++++---- drivers/media/dvb/frontends/dib3000mb_priv.h | 10 +++---- 3 files changed, 27 insertions(+), 29 deletions(-) diff --git a/drivers/media/dvb/frontends/cx24123.c b/drivers/media/dvb/frontends/cx24123.c index b1dd8ac..b73fb90 100644 --- a/drivers/media/dvb/frontends/cx24123.c +++ b/drivers/media/dvb/frontends/cx24123.c @@ -41,8 +41,8 @@ static int debug; module_param(debug, int, 0644); MODULE_PARM_DESC(debug, "Activates frontend debugging (default:0)"); -#define info(args...) do { printk(KERN_INFO "CX24123: " args); } while (0) -#define err(args...) do { printk(KERN_ERR "CX24123: " args); } while (0) +#define cx_info(args...) do { printk(KERN_INFO "CX24123: " args); } while (0) +#define cx_err(args...) do { printk(KERN_ERR "CX24123: " args); } while (0) #define dprintk(args...) \ do { \ @@ -274,7 +274,7 @@ static int cx24123_i2c_readreg(struct cx24123_state *state, u8 i2c_addr, u8 reg) ret = i2c_transfer(state->i2c, msg, 2); if (ret != 2) { - err("%s: reg=0x%x (error=%d)\n", __func__, reg, ret); + cx_err("%s: reg=0x%x (error=%d)\n", __func__, reg, ret); return ret; } @@ -620,7 +620,7 @@ static int cx24123_pll_writereg(struct dvb_frontend *fe, cx24123_writereg(state, 0x22, (data >> 16) & 0xff); while ((cx24123_readreg(state, 0x20) & 0x40) == 0) { if (time_after(jiffies, timeout)) { - err("%s: demodulator is not responding, "\ + cx_err("%s: demodulator is not responding, "\ "possibly hung, aborting.\n", __func__); return -EREMOTEIO; } @@ -632,7 +632,7 @@ static int cx24123_pll_writereg(struct dvb_frontend *fe, cx24123_writereg(state, 0x22, (data >> 8) & 0xff); while ((cx24123_readreg(state, 0x20) & 0x40) == 0) { if (time_after(jiffies, timeout)) { - err("%s: demodulator is not responding, "\ + cx_err("%s: demodulator is not responding, "\ "possibly hung, aborting.\n", __func__); return -EREMOTEIO; } @@ -645,7 +645,7 @@ static int cx24123_pll_writereg(struct dvb_frontend *fe, cx24123_writereg(state, 0x22, (data) & 0xff); while ((cx24123_readreg(state, 0x20) & 0x80)) { if (time_after(jiffies, timeout)) { - err("%s: demodulator is not responding," \ + cx_err("%s: demodulator is not responding," \ "possibly hung, aborting.\n", __func__); return -EREMOTEIO; } @@ -668,7 +668,7 @@ static int cx24123_pll_tune(struct dvb_frontend *fe, dprintk("frequency=%i\n", p->frequency); if (cx24123_pll_calculate(fe, p) != 0) { - err("%s: cx24123_pll_calcutate failed\n", __func__); + cx_err("%s: cx24123_pll_calcutate failed\n", __func__); return -EINVAL; } @@ -765,7 +765,7 @@ static void cx24123_wait_for_diseqc(struct cx24123_state *state) unsigned long timeout = jiffies + msecs_to_jiffies(200); while (!(cx24123_readreg(state, 0x29) & 0x40)) { if (time_after(jiffies, timeout)) { - err("%s: diseqc queue not ready, " \ + cx_err("%s: diseqc queue not ready, " \ "command may be lost.\n", __func__); break; } @@ -947,7 +947,7 @@ static int cx24123_set_frontend(struct dvb_frontend *fe, else if (fe->ops.tuner_ops.set_params) fe->ops.tuner_ops.set_params(fe, p); else - err("it seems I don't have a tuner..."); + cx_err("it seems I don't have a tuner..."); /* Enable automatic acquisition and reset cycle */ cx24123_writereg(state, 0x03, (cx24123_readreg(state, 0x03) | 0x07)); @@ -968,11 +968,11 @@ static int cx24123_get_frontend(struct dvb_frontend *fe, dprintk("\n"); if (cx24123_get_inversion(state, &p->inversion) != 0) { - err("%s: Failed to get inversion status\n", __func__); + cx_err("%s: Failed to get inversion status\n", __func__); return -EREMOTEIO; } if (cx24123_get_fec(state, &p->u.qpsk.fec_inner) != 0) { - err("%s: Failed to get fec status\n", __func__); + cx_err("%s: Failed to get fec status\n", __func__); return -EREMOTEIO; } p->frequency = state->currentfreq; @@ -999,7 +999,7 @@ static int cx24123_set_tone(struct dvb_frontend *fe, fe_sec_tone_mode_t tone) dprintk("setting tone off\n"); return cx24123_writereg(state, 0x29, val & 0xef); default: - err("CASE reached default with tone=%d\n", tone); + cx_err("CASE reached default with tone=%d\n", tone); return -EINVAL; } @@ -1075,7 +1075,7 @@ struct dvb_frontend *cx24123_attach(const struct cx24123_config *config, dprintk("\n"); if (state == NULL) { - err("Unable to kzalloc\n"); + cx_err("Unable to kzalloc\n"); goto error; } @@ -1087,13 +1087,13 @@ struct dvb_frontend *cx24123_attach(const struct cx24123_config *config, state->demod_rev = cx24123_readreg(state, 0x00); switch (state->demod_rev) { case 0xe1: - info("detected CX24123C\n"); + cx_info("detected CX24123C\n"); break; case 0xd1: - info("detected CX24123\n"); + cx_info("detected CX24123\n"); break; default: - err("wrong demod revision: %x\n", state->demod_rev); + cx_err("wrong demod revision: %x\n", state->demod_rev); goto error; } @@ -1112,7 +1112,7 @@ struct dvb_frontend *cx24123_attach(const struct cx24123_config *config, state->tuner_i2c_adapter.algo_data = NULL; i2c_set_adapdata(&state->tuner_i2c_adapter, state); if (i2c_add_adapter(&state->tuner_i2c_adapter) < 0) { - err("tuner i2c bus could not be initialized\n"); + cx_err("tuner i2c bus could not be initialized\n"); goto error; } diff --git a/drivers/media/dvb/frontends/dib3000mb.c b/drivers/media/dvb/frontends/dib3000mb.c index e80c597..b0a795a 100644 --- a/drivers/media/dvb/frontends/dib3000mb.c +++ b/drivers/media/dvb/frontends/dib3000mb.c @@ -147,7 +147,7 @@ static int dib3000mb_set_frontend(struct dvb_frontend* fe, case BANDWIDTH_AUTO: return -EOPNOTSUPP; default: - err("unknown bandwidth value."); + dib_err("unknown bandwidth value."); return -EINVAL; } } @@ -505,7 +505,7 @@ static int dib3000mb_get_frontend(struct dvb_frontend* fe, ofdm->constellation = QAM_64; break; default: - err("Unexpected constellation returned by TPS (%d)", tps_val); + dib_err("Unexpected constellation returned by TPS (%d)", tps_val); break; } deb_getf("TPS: %d\n", tps_val); @@ -532,7 +532,7 @@ static int dib3000mb_get_frontend(struct dvb_frontend* fe, ofdm->hierarchy_information = HIERARCHY_4; break; default: - err("Unexpected ALPHA value returned by TPS (%d)", tps_val); + dib_err("Unexpected ALPHA value returned by TPS (%d)", tps_val); break; } deb_getf("TPS: %d\n", tps_val); @@ -569,7 +569,7 @@ static int dib3000mb_get_frontend(struct dvb_frontend* fe, *cr = FEC_7_8; break; default: - err("Unexpected FEC returned by TPS (%d)", tps_val); + dib_err("Unexpected FEC returned by TPS (%d)", tps_val); break; } deb_getf("TPS: %d\n",tps_val); @@ -592,7 +592,7 @@ static int dib3000mb_get_frontend(struct dvb_frontend* fe, ofdm->guard_interval = GUARD_INTERVAL_1_4; break; default: - err("Unexpected Guard Time returned by TPS (%d)", tps_val); + dib_err("Unexpected Guard Time returned by TPS (%d)", tps_val); break; } deb_getf("TPS: %d\n", tps_val); @@ -607,7 +607,7 @@ static int dib3000mb_get_frontend(struct dvb_frontend* fe, ofdm->transmission_mode = TRANSMISSION_MODE_8K; break; default: - err("unexpected transmission mode return by TPS (%d)", tps_val); + dib_err("unexpected transmission mode return by TPS (%d)", tps_val); break; } deb_getf("TPS: %d\n", tps_val); diff --git a/drivers/media/dvb/frontends/dib3000mb_priv.h b/drivers/media/dvb/frontends/dib3000mb_priv.h index 16c5265..c9c36ce 100644 --- a/drivers/media/dvb/frontends/dib3000mb_priv.h +++ b/drivers/media/dvb/frontends/dib3000mb_priv.h @@ -13,20 +13,18 @@ #ifndef __DIB3000MB_PRIV_H_INCLUDED__ #define __DIB3000MB_PRIV_H_INCLUDED__ -/* info and err, taken from usb.h, if there is anything available like by default. */ -#define err(format, arg...) printk(KERN_ERR "dib3000: " format "\n" , ## arg) -#define info(format, arg...) printk(KERN_INFO "dib3000: " format "\n" , ## arg) -#define warn(format, arg...) printk(KERN_WARNING "dib3000: " format "\n" , ## arg) +/* dib_err - error printout wrapper */ +#define dib_err(format, arg...) printk(KERN_ERR "dib3000: " format "\n" , ## arg) /* handy shortcuts */ #define rd(reg) dib3000_read_reg(state,reg) #define wr(reg,val) if (dib3000_write_reg(state,reg,val)) \ - { err("while sending 0x%04x to 0x%04x.",val,reg); return -EREMOTEIO; } + { dib_err("while sending 0x%04x to 0x%04x.",val,reg); return -EREMOTEIO; } #define wr_foreach(a,v) { int i; \ if (sizeof(a) != sizeof(v)) \ - err("sizeof: %zu %zu is different",sizeof(a),sizeof(v));\ + dib_err("sizeof: %zu %zu is different",sizeof(a),sizeof(v));\ for (i=0; i < sizeof(a)/sizeof(u16); i++) \ wr(a[i],v[i]); \ } -- 1.7.1.1