From patchwork Fri Feb 22 17:21:24 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Elder X-Patchwork-Id: 2176631 Return-Path: X-Original-To: patchwork-ceph-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id B5EEF3FD4E for ; Fri, 22 Feb 2013 17:21:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758324Ab3BVRV2 (ORCPT ); Fri, 22 Feb 2013 12:21:28 -0500 Received: from mail-ie0-f181.google.com ([209.85.223.181]:51578 "EHLO mail-ie0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758022Ab3BVRV2 (ORCPT ); Fri, 22 Feb 2013 12:21:28 -0500 Received: by mail-ie0-f181.google.com with SMTP id 17so968109iea.40 for ; Fri, 22 Feb 2013 09:21:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=nwKJ0tSde2aYiZrczhJtvUD3Qyp5WQnFJt1Y6tCauqk=; b=peWLvfnmceiS4GmtufyYlSWKqD2L58NU9gY6e4o+adN5KzzCV6+jJBDOwxY+GvPT1f Su6ercpi6GDujBnoJid00L3l65M0Ie+9HqIfRKd+kddhoM6KUUJwjFtM17scedEHn76n LRwpXgmqZulddxAULOBk7Nwa+SWSMFJzXsRLSlE8zA+AuckGjdHwn+hOaAmSAcTqLAWa Aug1+oykJpFCMy0ckChRM15yg0j0N9Rgu6fOTj+y9V/R1W0l0KJOWpVEnzYfMbUrJMdT DP1UTfuLAWXNqWx4R/kccAd0r/lV0Q8jSA0vJYpNLajL3LCRPIpAbFi7w+ayYQ8bmQwr vqWg== X-Received: by 10.50.53.136 with SMTP id b8mr23141igp.0.1361553687289; Fri, 22 Feb 2013 09:21:27 -0800 (PST) Received: from [172.22.22.4] (c-71-195-31-37.hsd1.mn.comcast.net. [71.195.31.37]) by mx.google.com with ESMTPS id ww6sm2238726igb.2.2013.02.22.09.21.25 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 22 Feb 2013 09:21:26 -0800 (PST) Message-ID: <5127A914.2030002@inktank.com> Date: Fri, 22 Feb 2013 11:21:24 -0600 From: Alex Elder User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: "ceph-devel@vger.kernel.org >> ceph-devel" Subject: [PATCH, v2] ceph: eliminate sparse warnings in fs code References: <5127A85D.1070000@inktank.com> In-Reply-To: <5127A85D.1070000@inktank.com> X-Gm-Message-State: ALoCoQkVls2hp4DpxwyHpqT7pHNWLyr6dt6SqerVezaap6AKWHDZ4EUzQghCUaikAC1yvmndiGXA Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org Fix the causes for sparse warnings reported in the ceph file system code. Here there are only two (and they're sort of silly but they're easy to fix). This partially resolves: http://tracker.ceph.com/issues/4184 Reported-by: Fengguang Wu Signed-off-by: Alex Elder --- v2: rebased fs/ceph/xattr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c index 2135817..9b6b2b6 100644 --- a/fs/ceph/xattr.c +++ b/fs/ceph/xattr.c @@ -213,7 +213,7 @@ static struct ceph_vxattr ceph_dir_vxattrs[] = { XATTR_NAME_CEPH(dir, rsubdirs), XATTR_NAME_CEPH(dir, rbytes), XATTR_NAME_CEPH(dir, rctime), - { 0 } /* Required table terminator */ + { .name = NULL, 0 } /* Required table terminator */ }; static size_t ceph_dir_vxattrs_name_size; /* total size of all names */ @@ -232,7 +232,7 @@ static struct ceph_vxattr ceph_file_vxattrs[] = { XATTR_LAYOUT_FIELD(file, layout, stripe_count), XATTR_LAYOUT_FIELD(file, layout, object_size), XATTR_LAYOUT_FIELD(file, layout, pool), - { 0 } /* Required table terminator */ + { .name = NULL, 0 } /* Required table terminator */ }; static size_t ceph_file_vxattrs_name_size; /* total size of all names */