From patchwork Wed Jun 5 07:39:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Reinecke X-Patchwork-Id: 10976433 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 692532D47 for ; Wed, 5 Jun 2019 07:39:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5879628872 for ; Wed, 5 Jun 2019 07:39:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4C3F62886F; Wed, 5 Jun 2019 07:39:53 +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 039022886B for ; Wed, 5 Jun 2019 07:39:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726655AbfFEHjw (ORCPT ); Wed, 5 Jun 2019 03:39:52 -0400 Received: from mx2.suse.de ([195.135.220.15]:43074 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726341AbfFEHjw (ORCPT ); Wed, 5 Jun 2019 03:39:52 -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 EB220AFC7; Wed, 5 Jun 2019 07:39:50 +0000 (UTC) From: Hannes Reinecke To: Linus Torvalds Cc: "Martin K. Petersen" , Christoph Hellwig , James Bottomley , linux-scsi@vger.kernel.org, Hannes Reinecke Subject: [PATCH 0/4] libfc,fcoe: cleanup fc_rport_priv usage Date: Wed, 5 Jun 2019 09:39:38 +0200 Message-Id: <20190605073942.125577-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 cleanups to the libfc code, fixing up whitespaces and dropping an unused callback. As usual, comments and reviews are welcome. Hannes Reinecke (4): libfc: kill lld_event_callback 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 | 18 +++--- include/scsi/libfc.h | 55 ++++++++--------- include/scsi/libfcoe.h | 1 + 4 files changed, 104 insertions(+), 110 deletions(-)