From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752826AbbBQTCz (ORCPT ); Tue, 17 Feb 2015 14:02:55 -0500 Received: from smtprelay0056.hostedemail.com ([216.40.44.56]:37953 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751646AbbBQTCy (ORCPT ); Tue, 17 Feb 2015 14:02:54 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::,RULES_HIT:41:355:379:541:800:960:966:973:988:989:1260:1277:1311:1313:1314:1345:1373:1437:1515:1516:1518:1534:1542:1593:1594:1711:1730:1747:1777:1792:2196:2199:2393:2559:2562:2693:2828:3138:3139:3140:3141:3142:3353:3865:3866:3867:4385:5007:6261:7808:7903:8957:10004:10400:10848:11026:11473:11658:11914:12043:12296:12438:12517:12519:12555:13161:13229:14394:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: trip15_70508b3c89247 X-Filterd-Recvd-Size: 2662 Message-ID: <1424199769.25416.1.camel@perches.com> Subject: [PATCH] staging: i2o: Remove uses of return value of seq_printf From: Joe Perches To: Greg KH Cc: LKML Date: Tue, 17 Feb 2015 11:02:49 -0800 Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.12.7-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Even though this subsystem will go away soonish, using the return value of seq_printf prevents changing the return type of seq_ functions to void. This allows seq_ functions to become void functions without breaking compilation if this subsystem isn't deleted before the seq_ functions are converted. Eliminate these uses by changing the return value of the enclosing i2o_report_query_status function to void. Nothing uses the return value of this function. Change one fixed string to seq_puts just to keep the silly patch checker quiet. Signed-off-by: Joe Perches --- drivers/staging/i2o/i2o_proc.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/staging/i2o/i2o_proc.c b/drivers/staging/i2o/i2o_proc.c index ad84f33..6074eab 100644 --- a/drivers/staging/i2o/i2o_proc.c +++ b/drivers/staging/i2o/i2o_proc.c @@ -261,20 +261,23 @@ static char *chtostr(char *tmp, u8 *chars, int n) return strncat(tmp, (char *)chars, n); } -static int i2o_report_query_status(struct seq_file *seq, int block_status, - char *group) +static void i2o_report_query_status(struct seq_file *seq, int block_status, + char *group) { switch (block_status) { case -ETIMEDOUT: - return seq_printf(seq, "Timeout reading group %s.\n", group); + seq_printf(seq, "Timeout reading group %s.\n", group); + break; case -ENOMEM: - return seq_printf(seq, "No free memory to read the table.\n"); + seq_puts(seq, "No free memory to read the table.\n"); + break; case -I2O_PARAMS_STATUS_INVALID_GROUP_ID: - return seq_printf(seq, "Group %s not supported.\n", group); + seq_printf(seq, "Group %s not supported.\n", group); + break; default: - return seq_printf(seq, - "Error reading group %s. BlockStatus 0x%02X\n", - group, -block_status); + seq_printf(seq, "Error reading group %s. BlockStatus 0x%02X\n", + group, -block_status); + break; } }