From patchwork Wed Jul 12 23:00:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jasmin J." X-Patchwork-Id: 42447 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVQdh-0000gV-8X; Wed, 12 Jul 2017 23:01:49 +0000 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.89/mailfrontend-6) with esmtp id 1dVQdf-0006So-3J; Thu, 13 Jul 2017 01:01:48 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750923AbdGLXBm (ORCPT + 1 other); Wed, 12 Jul 2017 19:01:42 -0400 Received: from mail.anw.at ([195.234.101.228]:54586 "EHLO mail.anw.at" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750704AbdGLXBl (ORCPT ); Wed, 12 Jul 2017 19:01:41 -0400 Received: from hoppel.217.196.72.190 (anwhome.anw.at [195.234.103.23]) by mail.anw.at (8.14.4/8.14.4/Debian-4.1ubuntu1) with ESMTP id v6CN1axp023278; Thu, 13 Jul 2017 01:01:37 +0200 From: "Jasmin J." To: linux-media@vger.kernel.org Cc: mchehab@s-opensource.com, max.kellermann@gmail.com, rjkm@metzlerbros.de, d.scheller@gmx.net, jasmin@anw.at Subject: [PATCH V2 9/9] [media] dvb-core/dvb_ca_en50221.c: Fixed 80 char limit Date: Thu, 13 Jul 2017 01:00:58 +0200 Message-Id: <1499900458-2339-10-git-send-email-jasmin@anw.at> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499900458-2339-1-git-send-email-jasmin@anw.at> References: <1499900458-2339-1-git-send-email-jasmin@anw.at> X-Antivirus: checked in 0.032sec at mail.anw.at ([195.234.102.72]) by smf-clamd v1.2.1 - http://smfs.sf.net/ Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2017.7.12.225415 X-PMX-Spam: Gauge=IIIIIIIII, Probability=9%, Report=' AT_TLD 0.1, MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, IN_REP_TO 0, LEGITIMATE_SIGNS 0, MSG_THREAD 0, MULTIPLE_REAL_RCPTS 0, NO_URI_HTTPS 0, REFERENCES 0, __ANY_URI 0, __FROM_DOMAIN_IN_ANY_CC2 0, __FROM_DOMAIN_IN_RCPT 0, __HAS_CC_HDR 0, __HAS_FROM 0, __HAS_LIST_ID 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __MULTIPLE_RCPTS_CC_X2 0, __NO_HTML_TAG_RAW 0, __REFERENCES 0, __SANE_MSGID 0, __STOCK_PHRASE_7 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS ' From: Jasmin Jessich Fixed most of: WARNING: line over 80 characters The remaining lines are printk strings, which should not be split and lines where I thing they should stay as they are. Signed-off-by: Jasmin Jessich --- drivers/media/dvb-core/dvb_ca_en50221.c | 57 +++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 20 deletions(-) diff --git a/drivers/media/dvb-core/dvb_ca_en50221.c b/drivers/media/dvb-core/dvb_ca_en50221.c index 3e390a4..947c95c 100644 --- a/drivers/media/dvb-core/dvb_ca_en50221.c +++ b/drivers/media/dvb-core/dvb_ca_en50221.c @@ -76,7 +76,7 @@ MODULE_PARM_DESC(cam_debug, "enable verbose debug messages"); #define STATUSREG_WE 2 /* write error */ #define STATUSREG_FR 0x40 /* module free */ #define STATUSREG_DA 0x80 /* data available */ -#define STATUSREG_TXERR (STATUSREG_RE|STATUSREG_WE) /* general transfer error */ +#define STATUSREG_TXERR (STATUSREG_RE|STATUSREG_WE) /* general transfer error */ #define DVB_CA_SLOTSTATE_NONE 0 @@ -157,7 +157,9 @@ struct dvb_ca_private { /* Delay the main thread should use */ unsigned long delay; - /* Slot to start looking for data to read from in the next user-space read operation */ + /* Slot to start looking for data to read from in the next user-space + * read operation + */ int next_read_slot; /* mutex serializing ioctls */ @@ -227,7 +229,7 @@ static char *findstr(char *haystack, int hlen, char *needle, int nlen) -/* ******************************************************************************** */ +/* ************************************************************************** */ /* EN50221 physical interface functions */ @@ -346,8 +348,8 @@ static int dvb_ca_en50221_link_init(struct dvb_ca_private *ca, int slot) /* we'll be determining these during this function */ sl->da_irq_supported = 0; - /* set the host link buffer size temporarily. it will be overwritten with the - * real negotiated size later. + /* set the host link buffer size temporarily. it will be overwritten + * with the real negotiated size later. */ sl->link_buf_size = 2; @@ -366,7 +368,9 @@ static int dvb_ca_en50221_link_init(struct dvb_ca_private *ca, int slot) if (ret != 0) return ret; - /* store it, and choose the minimum of our buffer and the CAM's buffer size */ + /* store it, and choose the minimum of our buffer and the CAM's buffer + * size + */ buf_size = (buf[0] << 8) | buf[1]; if (buf_size > HOST_LINK_BUF_SIZE) buf_size = HOST_LINK_BUF_SIZE; @@ -435,7 +439,8 @@ static int dvb_ca_en50221_read_tuple(struct dvb_ca_private *ca, int slot, /* read in the whole tuple */ for (i = 0; i < _tupleLength; i++) { - tuple[i] = ca->pub->read_attribute_mem(ca->pub, slot, _address + (i * 2)); + tuple[i] = ca->pub->read_attribute_mem(ca->pub, slot, + _address + (i * 2)); dprintk(" 0x%02x: 0x%02x %c\n", i, tuple[i] & 0xff, ((tuple[i] > 31) && (tuple[i] < 127)) ? tuple[i] : '.'); @@ -588,7 +593,7 @@ static int dvb_ca_en50221_parse_attributes(struct dvb_ca_private *ca, int slot) end_chain = 1; break; - default: /* Unknown tuple type - just skip this tuple and move to the next one */ + default: /* Unknown tuple type - just skip this tuple */ dprintk("dvb_ca: Skipping unknown tuple type:0x%x length:0x%x\n", tupleType, tupleLength); break; @@ -764,7 +769,9 @@ static int dvb_ca_en50221_read_data(struct dvb_ca_private *ca, int slot, } } - /* OK, add it to the receive buffer, or copy into external buffer if supplied */ + /* OK, add it to the receive buffer, or copy into external buffer if + * supplied + */ if (ebuf == NULL) { if (sl->rx_buffer.data == NULL) { status = -EIO; @@ -915,7 +922,7 @@ static int dvb_ca_en50221_write_data(struct dvb_ca_private *ca, int slot, -/* ******************************************************************************** */ +/* ************************************************************************** */ /* EN50221 higher level functions */ @@ -951,7 +958,8 @@ static int dvb_ca_en50221_slot_shutdown(struct dvb_ca_private *ca, int slot) * @slot: Slot concerned. * @change_type: One of the DVB_CA_CAMCHANGE_* values. */ -void dvb_ca_en50221_camchange_irq(struct dvb_ca_en50221 *pubca, int slot, int change_type) +void dvb_ca_en50221_camchange_irq(struct dvb_ca_en50221 *pubca, int slot, + int change_type) { struct dvb_ca_private *ca = pubca->private; struct dvb_ca_slot *sl = &ca->slot_info[slot]; @@ -1027,7 +1035,7 @@ void dvb_ca_en50221_frda_irq(struct dvb_ca_en50221 *pubca, int slot) EXPORT_SYMBOL(dvb_ca_en50221_frda_irq); -/* ******************************************************************************** */ +/* ************************************************************************** */ /* EN50221 thread functions */ /** @@ -1342,7 +1350,7 @@ static int dvb_ca_en50221_thread(void *data) -/* ******************************************************************************** */ +/* ************************************************************************** */ /* EN50221 IO interface functions */ /** @@ -1475,7 +1483,9 @@ static ssize_t dvb_ca_en50221_io_write(struct file *file, dprintk("%s\n", __func__); - /* Incoming packet has a 2 byte header. hdr[0] = slot_id, hdr[1] = connection_id */ + /* Incoming packet has a 2 byte header. + * hdr[0] = slot_id, hdr[1] = connection_id + */ if (count < 2) return -EINVAL; @@ -1513,14 +1523,17 @@ static ssize_t dvb_ca_en50221_io_write(struct file *file, timeout = jiffies + HZ / 2; written = 0; while (!time_after(jiffies, timeout)) { - /* check the CAM hasn't been removed/reset in the meantime */ + /* check the CAM hasn't been removed/reset in the + * meantime + */ if (sl->slot_state != DVB_CA_SLOTSTATE_RUNNING) { status = -EIO; goto exit; } mutex_lock(&sl->slot_lock); - status = dvb_ca_en50221_write_data(ca, slot, fragbuf, fraglen + 2); + status = dvb_ca_en50221_write_data(ca, slot, fragbuf, + fraglen + 2); mutex_unlock(&sl->slot_lock); if (status == (fraglen + 2)) { written = 1; @@ -1574,7 +1587,8 @@ static int dvb_ca_en50221_io_read_condition(struct dvb_ca_private *ca, dvb_ringbuffer_pkt_read(&sl->rx_buffer, idx, 0, hdr, 2); if (connection_id == -1) connection_id = hdr[0]; - if ((hdr[0] == connection_id) && ((hdr[1] & 0x80) == 0)) { + if ((hdr[0] == connection_id) && + ((hdr[1] & 0x80) == 0)) { *_slot = slot; found = 1; break; @@ -1623,7 +1637,9 @@ static ssize_t dvb_ca_en50221_io_read(struct file *file, char __user *buf, dprintk("%s\n", __func__); - /* Outgoing packet has a 2 byte header. hdr[0] = slot_id, hdr[1] = connection_id */ + /* Outgoing packet has a 2 byte header. + * hdr[0] = slot_id, hdr[1] = connection_id + */ if (count < 2) return -EINVAL; @@ -1842,7 +1858,7 @@ static const struct dvb_device dvbdev_ca = { .fops = &dvb_ca_fops, }; -/* ******************************************************************************** */ +/* ************************************************************************** */ /* Initialisation/shutdown functions */ @@ -1891,7 +1907,8 @@ int dvb_ca_en50221_init(struct dvb_adapter *dvb_adapter, pubca->private = ca; /* register the DVB device */ - ret = dvb_register_device(dvb_adapter, &ca->dvbdev, &dvbdev_ca, ca, DVB_DEVICE_CA, 0); + ret = dvb_register_device(dvb_adapter, &ca->dvbdev, &dvbdev_ca, ca, + DVB_DEVICE_CA, 0); if (ret) goto free_slot_info;