From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752500AbcI3XfX convert rfc822-to-8bit (ORCPT ); Fri, 30 Sep 2016 19:35:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58010 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750873AbcI3XfN (ORCPT ); Fri, 30 Sep 2016 19:35:13 -0400 Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20160930161218.4178124-1-arnd@arndb.de> References: <20160930161218.4178124-1-arnd@arndb.de> To: Arnd Bergmann Cc: dhowells@redhat.com, "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] rxrpc: split up rxrpc_send_call_packet() MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <12691.1475278509.1@warthog.procyon.org.uk> Content-Transfer-Encoding: 8BIT Date: Sat, 01 Oct 2016 00:35:09 +0100 Message-ID: <12692.1475278509@warthog.procyon.org.uk> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 30 Sep 2016 23:35:12 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Arnd Bergmann wrote: > A number of reworks went into rxrpc_send_call_packet() recently, which > introduced another warning when built with -Wmaybe-uninitialized: > > In file included from ../net/rxrpc/output.c:20:0: > net/rxrpc/output.c: In function 'rxrpc_send_call_packet': > net/rxrpc/ar-internal.h:1187:27: error: 'top' may be used uninitialized in this function [-Werror=maybe-uninitialized] > net/rxrpc/output.c:103:24: note: 'top' was declared here > net/rxrpc/output.c:225:25: error: 'hard_ack' may be used uninitialized in this function [-Werror=maybe-uninitialized] > > This is a false positive, but it's also an indication that the function is > getting complex enough that the compiler cannot figure out what it does. > > This splits out a rxrpc_send_ack_packet() function for one part of > it, making it more understandable by both humans and the compiler > and avoiding the warning. > > Signed-off-by: Arnd Bergmann > --- > Unfortunately, this is a larger rework that I was hoping for, and > I have only build tested it, so please review carefully, or just > discard it and treat it as feedback to the original patch. I think I'd rather cleanly split it into two transmission functions. I'll do that. Thanks, David