From patchwork Tue Dec 2 23:12:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 5425101 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 5AA0FBEEA8 for ; Tue, 2 Dec 2014 23:10:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 81D6520306 for ; Tue, 2 Dec 2014 23:10:39 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 33E98202FE for ; Tue, 2 Dec 2014 23:10:38 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 2C417261734; Wed, 3 Dec 2014 00:10:37 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id C815026040D; Wed, 3 Dec 2014 00:10:26 +0100 (CET) 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 6265026040E; Wed, 3 Dec 2014 00:10:25 +0100 (CET) Received: from mail-wg0-f52.google.com (mail-wg0-f52.google.com [74.125.82.52]) by alsa0.perex.cz (Postfix) with ESMTP id 71E752603A5 for ; Wed, 3 Dec 2014 00:10:17 +0100 (CET) Received: by mail-wg0-f52.google.com with SMTP id a1so18435676wgh.39 for ; Tue, 02 Dec 2014 15:10:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ac3Rdgg70ydopi+J0w8ObuR09M12ciQTT9WhMLzZOqg=; b=M4ZwKyx40csIZKD5kZLU2exthQ60GlKrRjCM1KB2icwrKAUxh82mUxQOi6A4iWfNKp AyMBk85JXR/s2guXRq/YAD+qqJuskau/m5zab7HlchsQ46Y5Qf6SYSajX1BWn3zIUdhf p/v9nGCgYTtSkNN+m1vXxqRH8t3qek/cM4+awPzhe/z6mgFyT+nH2JnAiV0//sj3F4am WGPR00sNRwAGdEK3VKwzLu2Zts4mBqY85SAtsjWWTcExAtsXOlzWzHaiX/gBcPfhnjBj vfvI/IITyEp6NbbF6vrtPEyCkPtrSRB4V11CiJGpVkH+GlvvhbezwD991CWMlrEfbpge t7pQ== X-Gm-Message-State: ALoCoQktixWqIAoQU2MjD581+ad9DjiMl1MUh5W9+p6Wg3vmMB49pmsZr8N9eMPspzlIWYZfTdbx X-Received: by 10.194.189.240 with SMTP id gl16mr2136852wjc.119.1417561817223; Tue, 02 Dec 2014 15:10:17 -0800 (PST) Received: from localhost.localdomain (h-246-111.a218.priv.bahnhof.se. [85.24.246.111]) by mx.google.com with ESMTPSA id bc1sm48287079wib.16.2014.12.02.15.10.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Dec 2014 15:10:16 -0800 (PST) From: Rickard Strandqvist To: Jaroslav Kysela , Takashi Iwai Date: Wed, 3 Dec 2014 00:12:55 +0100 Message-Id: <1417561975-27627-1-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 Cc: Bjorn Helgaas , Benoit Taine , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Rickard Strandqvist Subject: [alsa-devel] [PATCH] sound: pci: cmipci.c: Cleaning up function that are not used anywhere 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 Remove function snd_cmipci_pll_rmn() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- sound/pci/cmipci.c | 41 ----------------------------------------- 1 file changed, 41 deletions(-) diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c index 85ed403..e33edae 100644 --- a/sound/pci/cmipci.c +++ b/sound/pci/cmipci.c @@ -615,47 +615,6 @@ static unsigned int snd_cmipci_rate_freq(unsigned int rate) #ifdef USE_VAR48KRATE /* - * Determine PLL values for frequency setup, maybe the CMI8338 (CMI8738???) - * does it this way .. maybe not. Never get any information from C-Media about - * that . - */ -static int snd_cmipci_pll_rmn(unsigned int rate, unsigned int adcmult, int *r, int *m, int *n) -{ - unsigned int delta, tolerance; - int xm, xn, xr; - - for (*r = 0; rate < CM_MAXIMUM_RATE/adcmult; *r += (1<<5)) - rate <<= 1; - *n = -1; - if (*r > 0xff) - goto out; - tolerance = rate*CM_TOLERANCE_RATE; - - for (xn = (1+2); xn < (0x1f+2); xn++) { - for (xm = (1+2); xm < (0xff+2); xm++) { - xr = ((CM_REFFREQ_XIN/adcmult) * xm) / xn; - - if (xr < rate) - delta = rate - xr; - else - delta = xr - rate; - - /* - * If we found one, remember this, - * and try to find a closer one - */ - if (delta < tolerance) { - tolerance = delta; - *m = xm - 2; - *n = xn - 2; - } - } - } -out: - return (*n > -1); -} - -/* * Program pll register bits, I assume that the 8 registers 0xf8 up to 0xff * are mapped onto the 8 ADC/DAC sampling frequency which can be chosen * at the register CM_REG_FUNCTRL1 (0x04).