From patchwork Mon Jul 22 06:22:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 11051663 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A5618912 for ; Mon, 22 Jul 2019 06:22:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8FBA1283AD for ; Mon, 22 Jul 2019 06:22:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7ECDF28511; Mon, 22 Jul 2019 06:22:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2D579283AD for ; Mon, 22 Jul 2019 06:22:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727239AbfGVGWd (ORCPT ); Mon, 22 Jul 2019 02:22:33 -0400 Received: from mx2.suse.de ([195.135.220.15]:45186 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727617AbfGVGWd (ORCPT ); Mon, 22 Jul 2019 02:22:33 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 5D4C0ADDC; Mon, 22 Jul 2019 06:22:32 +0000 (UTC) From: Hannes Reinecke To: "Martin K. Petersen" Cc: James Bottomley , Bart van Assche , Christoph Hellwig , Linus Torvalds , linux-scsi@vger.kernel.org, Hannes Reinecke Subject: [PATCHv2 0/3] fcoe: cleanup fc_rport_priv usage Date: Mon, 22 Jul 2019 08:22:28 +0200 Message-Id: <20190722062231.115865-1-hare@suse.de> X-Mailer: git-send-email 2.16.4 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi all, the fcoe vn2vn code is using the 'fc_rport_priv' structure as argument to its internal function, but is really expecting a struct fcoe_rport to immediately follow this one. This is not only confusing but also an error for new compilers. So clean up the usage by embedding fc_rport_priv into fcoe_rport, and use the fcoe_rport structure wherever possible. This patchset also contains some minor whitespace cleanups for libfc.h. As usual, comments and reviews are welcome. Changes to v1: - Drop patch to remove lld_event_callback Hannes Reinecke (3): libfc: Whitespqce cleanup in libfc.h fcoe: avoid memset across pointer boundaries fcoe: pass in fcoe_rport structure instead of fc_rport_priv drivers/scsi/fcoe/fcoe_ctlr.c | 140 ++++++++++++++++++++---------------------- drivers/scsi/libfc/fc_rport.c | 5 +- include/scsi/libfc.h | 52 ++++++++-------- include/scsi/libfcoe.h | 1 + 4 files changed, 98 insertions(+), 100 deletions(-)