Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757877Ab0AOAVn (ORCPT ); Thu, 14 Jan 2010 19:21:43 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752292Ab0AOAVm (ORCPT ); Thu, 14 Jan 2010 19:21:42 -0500 Received: from [206.15.93.42] ([206.15.93.42]:15418 "EHLO visionfs1.visionengravers.com" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1750757Ab0AOAVm (ORCPT ); Thu, 14 Jan 2010 19:21:42 -0500 From: H Hartley Sweeten To: Linux Kernel , netdev@vger.kernel.org Subject: [PATCH] net/core/sock.c: quiet sparse noise Date: Thu, 14 Jan 2010 17:21:45 -0700 Cc: davem@davemloft.net MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <201001141721.45305.hartleys@visionengravers.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1146 Lines: 38 net/core/sock.c: quiet sparse noise In sock_getsockopt the symbol 'lv' is declared as an unsigned int type, probably due to sizeof returning a size_t which is really an unsigned int. This produces a sparse warning for SO_PEERNAME due to the sock->ops->getname() call: warning: incorrect type in argument 3 (different signedness) expected int *sockaddr_len got unsigned int * Quiet the warning my changing the type of 'lv' to an int. Signed-off-by: H Hartley Sweeten Cc: David S. Miller --- diff --git a/net/core/sock.c b/net/core/sock.c index e1f6f22..10b1d32 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -741,7 +741,7 @@ int sock_getsockopt(struct socket *sock, int level, int optname, struct timeval tm; } v; - unsigned int lv = sizeof(int); + int lv = sizeof(int); int len; if (get_user(len, optlen)) -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/