From patchwork Tue Aug 26 12:22:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 4781341 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 48451C0338 for ; Tue, 26 Aug 2014 12:22:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BEE70201C0 for ; Tue, 26 Aug 2014 12:22:55 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id F2A02201D5 for ; Tue, 26 Aug 2014 12:22:53 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 12F7A2651AC; Tue, 26 Aug 2014 14:22:52 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id F015826513C; Tue, 26 Aug 2014 14:22:40 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id B4E17265167; Tue, 26 Aug 2014 14:22:39 +0200 (CEST) Received: from mail-pd0-f170.google.com (mail-pd0-f170.google.com [209.85.192.170]) by alsa0.perex.cz (Postfix) with ESMTP id 75BE9264FFB for ; Tue, 26 Aug 2014 14:22:31 +0200 (CEST) Received: by mail-pd0-f170.google.com with SMTP id g10so22013962pdj.15 for ; Tue, 26 Aug 2014 05:22:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ezIO5KHbyy4OBPdTrkWax1rnIkyeiKgZPMlAShj/wAU=; b=i/6g5YdrgkVxHDUsZsOJQXVepPKSMbDf0zpKccmaL0lkPPIxcnMOOMVxolFILISSKD 49IvBgFb8oo3onfI0eHOFBBjTdK4SERzvSKlnyTnaUkGRkHQra+Cd7NWykx1DA6BUnGC YYlYgpo+aq5firC7fpXhiD0SGcJbAKrGYNKYIdrdKGBs6xnbxUcQQW5r0ALB3/4EgtkU /M+IyvQnkJE+eoT2RLx9VxJnyNIlx9vqzJp3O2i0Px3wK3RLx0K3tiUl1hX0Afe7/c4T GPJi/SU1woekh5SHogkiNWPxmYrjGmBAuTwwRywBlnftsIBYfN0oQE4GHIaW6DXxVBZs hKsg== X-Received: by 10.70.130.195 with SMTP id og3mr36306424pdb.59.1409055747367; Tue, 26 Aug 2014 05:22:27 -0700 (PDT) Received: from localhost.localdomain ([122.169.153.158]) by mx.google.com with ESMTPSA id ey4sm4448555pdb.79.2014.08.26.05.22.24 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 26 Aug 2014 05:22:26 -0700 (PDT) From: Sudip Mukherjee To: Jaroslav Kysela , Takashi Iwai Date: Tue, 26 Aug 2014 17:52:14 +0530 Message-Id: <1409055734-2777-1-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <[PATCH] sound: pci: ctxfi: prink replacement> References: <[PATCH] sound: pci: ctxfi: prink replacement> Cc: alsa-devel@alsa-project.org, Sudip Mukherjee , linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH] sound: pci: ctxfi: fix broken user-visible string X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP fixed broken user visible strings Signed-off-by: Sudip Mukherjee --- I am not exactly sure about the patch as some lines after fixing has crossed the limit of 80 characters. But the coding style says : "never break user-visible strings such as printk messages, because that breaks the ability to grep for them" sound/pci/ctxfi/ctatc.c | 18 +++++++----------- sound/pci/ctxfi/cthw20k1.c | 3 +-- sound/pci/ctxfi/cthw20k2.c | 11 +++++------ sound/pci/ctxfi/ctmixer.c | 6 ++---- sound/pci/ctxfi/ctresource.c | 20 ++++++++------------ sound/pci/ctxfi/ctvmem.c | 6 ++---- sound/pci/ctxfi/xfi.c | 6 ++---- 7 files changed, 27 insertions(+), 43 deletions(-) diff --git a/sound/pci/ctxfi/ctatc.c b/sound/pci/ctxfi/ctatc.c index ce9061a..d92a08c 100644 --- a/sound/pci/ctxfi/ctatc.c +++ b/sound/pci/ctxfi/ctatc.c @@ -185,7 +185,7 @@ static unsigned int convert_format(snd_pcm_format_t snd_format) case SNDRV_PCM_FORMAT_FLOAT_LE: return SRC_SF_F32; default: - pr_err("ctxfi: not recognized snd format is %d \n", + pr_err("ctxfi: not recognized snd format is %d\n", snd_format); return SRC_SF_S16; } @@ -1282,8 +1282,7 @@ static int atc_identify_card(struct ct_atc *atc, unsigned int ssid) p = snd_pci_quirk_lookup_id(vendor_id, device_id, list); if (p) { if (p->value < 0) { - pr_err("ctxfi: " - "Device %04x:%04x is black-listed\n", + pr_err("ctxfi: Device %04x:%04x is black-listed\n", vendor_id, device_id); return -ENOENT; } @@ -1315,8 +1314,7 @@ int ct_atc_create_alsa_devs(struct ct_atc *atc) err = alsa_dev_funcs[i].create(atc, i, alsa_dev_funcs[i].public_name); if (err) { - pr_err("ctxfi: " - "Creating alsa device %d failed!\n", i); + pr_err("ctxfi: Creating alsa device %d failed!\n", i); return err; } } @@ -1351,8 +1349,7 @@ static int atc_create_hw_devs(struct ct_atc *atc) err = rsc_mgr_funcs[i].create(atc->hw, &atc->rsc_mgrs[i]); if (err) { - pr_err("ctxfi: " - "Failed to create rsc_mgr %d!!!\n", i); + pr_err("ctxfi: Failed to create rsc_mgr %d!!!\n", i); return err; } } @@ -1399,8 +1396,8 @@ static int atc_get_resources(struct ct_atc *atc) err = daio_mgr->get_daio(daio_mgr, &da_desc, (struct daio **)&atc->daios[i]); if (err) { - pr_err("ctxfi: Failed to get DAIO " - "resource %d!!!\n", i); + pr_err("ctxfi: Failed to get DAIO resource %d!!!\n", + i); return err; } atc->n_daio++; @@ -1603,8 +1600,7 @@ static int atc_resume(struct ct_atc *atc) /* Do hardware resume. */ err = atc_hw_resume(atc); if (err < 0) { - pr_err("ctxfi: pci_enable_device failed, " - "disabling device\n"); + pr_err("ctxfi: pci_enable_device failed, disabling device\n"); snd_card_disconnect(atc->card); return err; } diff --git a/sound/pci/ctxfi/cthw20k1.c b/sound/pci/ctxfi/cthw20k1.c index 782641e..71d496f 100644 --- a/sound/pci/ctxfi/cthw20k1.c +++ b/sound/pci/ctxfi/cthw20k1.c @@ -1911,8 +1911,7 @@ static int hw_card_start(struct hw *hw) /* Set DMA transfer mask */ if (pci_set_dma_mask(pci, CT_XFI_DMA_MASK) < 0 || pci_set_consistent_dma_mask(pci, CT_XFI_DMA_MASK) < 0) { - pr_err("architecture does not support PCI " - "busmaster DMA with mask 0x%llx\n", + pr_err("architecture does not support PCI busmaster DMA with mask 0x%llx\n", CT_XFI_DMA_MASK); err = -ENXIO; goto error1; diff --git a/sound/pci/ctxfi/cthw20k2.c b/sound/pci/ctxfi/cthw20k2.c index 8a72fac..df2d8c5 100644 --- a/sound/pci/ctxfi/cthw20k2.c +++ b/sound/pci/ctxfi/cthw20k2.c @@ -1246,8 +1246,7 @@ static int hw_trn_init(struct hw *hw, const struct trn_conf *info) /* Set up device page table */ if ((~0UL) == info->vm_pgt_phys) { - pr_alert("ctxfi: " - "Wrong device page table page address!!!\n"); + pr_alert("ctxfi: Wrong device page table page address!!!\n"); return -1; } @@ -1890,8 +1889,8 @@ static int hw_adc_init(struct hw *hw, const struct adc_conf *info) hw20k2_i2c_write(hw, MAKE_WM8775_ADDR(WM8775_MMC, 0x0A), MAKE_WM8775_DATA(0x0A)); } else { - pr_alert("ctxfi: Invalid master sampling " - "rate (msr %d)!!!\n", info->msr); + pr_alert("ctxfi: Invalid master sampling rate (msr %d)!!!\n", + info->msr); err = -EINVAL; goto error; } @@ -2034,8 +2033,8 @@ static int hw_card_start(struct hw *hw) /* Set DMA transfer mask */ if (pci_set_dma_mask(pci, CT_XFI_DMA_MASK) < 0 || pci_set_consistent_dma_mask(pci, CT_XFI_DMA_MASK) < 0) { - pr_err("ctxfi: architecture does not support PCI " - "busmaster DMA with mask 0x%llx\n", CT_XFI_DMA_MASK); + pr_err("ctxfi: architecture does not support PCI busmaster DMA with mask 0x%llx\n", + CT_XFI_DMA_MASK); err = -ENXIO; goto error1; } diff --git a/sound/pci/ctxfi/ctmixer.c b/sound/pci/ctxfi/ctmixer.c index 8d986e4..017fa91 100644 --- a/sound/pci/ctxfi/ctmixer.c +++ b/sound/pci/ctxfi/ctmixer.c @@ -854,8 +854,7 @@ static int ct_mixer_get_resources(struct ct_mixer *mixer) for (i = 0; i < (NUM_CT_SUMS * CHN_NUM); i++) { err = sum_mgr->get_sum(sum_mgr, &sum_desc, &sum); if (err) { - pr_err("ctxfi:Failed to get sum resources for " - "front output!\n"); + pr_err("ctxfi:Failed to get sum resources for front output!\n"); break; } mixer->sums[i] = sum; @@ -869,8 +868,7 @@ static int ct_mixer_get_resources(struct ct_mixer *mixer) for (i = 0; i < (NUM_CT_AMIXERS * CHN_NUM); i++) { err = amixer_mgr->get_amixer(amixer_mgr, &am_desc, &amixer); if (err) { - pr_err("ctxfi:Failed to get amixer resources " - "for mixer obj!\n"); + pr_err("ctxfi:Failed to get amixer resources for mixer obj!\n"); break; } mixer->amixers[i] = amixer; diff --git a/sound/pci/ctxfi/ctresource.c b/sound/pci/ctxfi/ctresource.c index 11ac934..e49d2be 100644 --- a/sound/pci/ctxfi/ctresource.c +++ b/sound/pci/ctxfi/ctresource.c @@ -162,14 +162,12 @@ int rsc_init(struct rsc *rsc, u32 idx, enum RSCTYP type, u32 msr, void *hw) case DAIO: break; default: - pr_err( - "ctxfi: Invalid resource type value %d!\n", type); + pr_err("ctxfi: Invalid resource type value %d!\n", type); return -EINVAL; } if (err) { - pr_err( - "ctxfi: Failed to get resource control block!\n"); + pr_err("ctxfi: Failed to get resource control block!\n"); return err; } @@ -192,8 +190,8 @@ int rsc_uninit(struct rsc *rsc) case DAIO: break; default: - pr_err("ctxfi: " - "Invalid resource type value %d!\n", rsc->type); + pr_err("ctxfi: Invalid resource type value %d!\n", + rsc->type); break; } @@ -235,15 +233,13 @@ int rsc_mgr_init(struct rsc_mgr *mgr, enum RSCTYP type, case SUM: break; default: - pr_err( - "ctxfi: Invalid resource type value %d!\n", type); + pr_err("ctxfi: Invalid resource type value %d!\n", type); err = -EINVAL; goto error; } if (err) { - pr_err( - "ctxfi: Failed to get manager control block!\n"); + pr_err("ctxfi: Failed to get manager control block!\n"); goto error; } @@ -286,8 +282,8 @@ int rsc_mgr_uninit(struct rsc_mgr *mgr) case SUM: break; default: - pr_err("ctxfi: " - "Invalid resource type value %d!\n", mgr->type); + pr_err("ctxfi: Invalid resource type value %d!\n", + mgr->type); break; } diff --git a/sound/pci/ctxfi/ctvmem.c b/sound/pci/ctxfi/ctvmem.c index 5ea015b..38163f5 100644 --- a/sound/pci/ctxfi/ctvmem.c +++ b/sound/pci/ctxfi/ctvmem.c @@ -36,8 +36,7 @@ get_vm_block(struct ct_vm *vm, unsigned int size) size = CT_PAGE_ALIGN(size); if (size > vm->size) { - pr_err("ctxfi: Fail! No sufficient device virtual " - "memory space available!\n"); + pr_err("ctxfi: Fail! No sufficient device virtual memory space available!\n"); return NULL; } @@ -132,8 +131,7 @@ ct_vm_map(struct ct_vm *vm, struct snd_pcm_substream *substream, int size) block = get_vm_block(vm, size); if (block == NULL) { - pr_err("ctxfi: No virtual memory block that is big " - "enough to allocate!\n"); + pr_err("ctxfi: No virtual memory block that is big enough to allocate!\n"); return NULL; } diff --git a/sound/pci/ctxfi/xfi.c b/sound/pci/ctxfi/xfi.c index af8c498..35e85ba 100644 --- a/sound/pci/ctxfi/xfi.c +++ b/sound/pci/ctxfi/xfi.c @@ -78,15 +78,13 @@ ct_card_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) if ((reference_rate != 48000) && (reference_rate != 44100)) { pr_err("ctxfi: Invalid reference_rate value %u!!!\n", reference_rate); - pr_err("ctxfi: The valid values for reference_rate " - "are 48000 and 44100, Value 48000 is assumed.\n"); + pr_err("ctxfi: The valid values for reference_rate are 48000 and 44100, Value 48000 is assumed.\n"); reference_rate = 48000; } if ((multiple != 1) && (multiple != 2) && (multiple != 4)) { pr_err("ctxfi: Invalid multiple value %u!!!\n", multiple); - pr_err("ctxfi: The valid values for multiple are " - "1, 2 and 4, Value 2 is assumed.\n"); + pr_err("ctxfi: The valid values for multiple are 1, 2 and 4, Value 2 is assumed.\n"); multiple = 2; } err = ct_atc_create(card, pci, reference_rate, multiple,