linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Boaz Harrosh <ooo@electrozaur.com>
To: Nathan Chancellor <natechancellor@gmail.com>,
	Bart Van Assche <bvanassche@acm.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>,
	"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	linux-scsi@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] libosd: Remove ignored __weak attribute
Date: Thu, 1 Nov 2018 03:39:54 +0200	[thread overview]
Message-ID: <1c58c82f-5cfa-f483-097a-5b82904e5e9a@electrozaur.com> (raw)
In-Reply-To: <20181025213144.GB24709@flashbox>

On 26/10/18 00:31, Nathan Chancellor wrote:
> On Tue, Oct 02, 2018 at 04:06:31PM -0700, Bart Van Assche wrote:
<>
> 
> Hi Bart,
> 
> I'm sorry if I didn't follow the conclusion of this conversation properly
> but this is the below diff you were initially looking for, correct?
> 
> If so, Boaz and Nick, do you have any objections if this is v2? I'd like
> to get this patch accepted so the warning can be fixed for everyone.
> 

ACK on both the original and below code they will all work just fine.

I do like the original "just remove the _weak thingy". But this one
will work as well.

The "with extern" version suggested before is more cumbersome because it will
need an EXPORT_SYMBOL() but will also work.

The all use of osd_root_object is just. A properly C-types pointer to couple
of ZEROS. but since the Interface needs a pointer, those zeros need storage
somewhere. It does not matter where. (The value of the pointer is not used
only its content)

Do you need that I send a proper patch? Actually the original first patch
is the version I like. (And again all 3 approaches will work)

Thanks
Boaz

> Thanks,
> Nathan
> 
> ================================================================================
> 
> diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c
> index e19fa883376f..4250f739beb3 100644
> --- a/drivers/scsi/osd/osd_initiator.c
> +++ b/drivers/scsi/osd/osd_initiator.c
> @@ -58,6 +58,8 @@
> 
>  enum { OSD_REQ_RETRIES = 1 };
> 
> +static const struct osd_obj_id osd_root_object;
> +
>  MODULE_AUTHOR("Boaz Harrosh <ooo@electrozaur.com>");
>  MODULE_DESCRIPTION("open-osd initiator library libosd.ko");
>  MODULE_LICENSE("GPL");
> diff --git a/drivers/scsi/osd/osd_uld.c b/drivers/scsi/osd/osd_uld.c
> index eaf36ccf58db..770c758baaa9 100644
> --- a/drivers/scsi/osd/osd_uld.c
> +++ b/drivers/scsi/osd/osd_uld.c
> @@ -73,6 +73,7 @@
> 
>  static const char osd_name[] = "osd";
>  static const char *osd_version_string = "open-osd 0.2.1";
> +static const struct osd_obj_id osd_root_object;
> 
>  MODULE_AUTHOR("Boaz Harrosh <ooo@electrozaur.com>");
>  MODULE_DESCRIPTION("open-osd Upper-Layer-Driver osd.ko");
> diff --git a/include/scsi/osd_types.h b/include/scsi/osd_types.h
> index 48e8a165e136..eb31357ec8b3 100644
> --- a/include/scsi/osd_types.h
> +++ b/include/scsi/osd_types.h
> @@ -28,8 +28,6 @@ struct osd_obj_id {
>         osd_id id;
>  };
> 
> -static const struct __weak osd_obj_id osd_root_object = {0, 0};
> -
>  struct osd_attr {
>         u32 attr_page;
>         u32 attr_id;
> 


  parent reply	other threads:[~2018-11-01  1:40 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-30 20:54 [PATCH] libosd: Remove ignored __weak attribute Nathan Chancellor
2018-10-01 22:47 ` Nick Desaulniers
2018-10-02  1:16 ` Bart Van Assche
2018-10-02  6:55   ` Nathan Chancellor
2018-10-02 14:56   ` Christoph Hellwig
2018-10-02 16:59     ` Boaz Harrosh
2018-10-02 17:24   ` Nick Desaulniers
2018-10-02 17:57     ` Bart Van Assche
2018-10-02 22:33       ` Nick Desaulniers
2018-10-02 23:06         ` Bart Van Assche
2018-10-25 21:31           ` Nathan Chancellor
2018-10-25 22:02             ` Nick Desaulniers
2018-10-25 22:55               ` Nathan Chancellor
2018-10-26 17:54                 ` Nick Desaulniers
2018-10-26 18:01                   ` Bart Van Assche
2018-10-26 18:05                     ` Nathan Chancellor
2018-10-26 18:31                       ` Nick Desaulniers
2018-10-26 19:22                         ` Linus Torvalds
2018-10-26 20:05                           ` Nick Desaulniers
2018-10-26 20:42                             ` Linus Torvalds
2018-10-26 21:02                               ` Nick Desaulniers
2018-10-26 21:00                     ` Nick Desaulniers
2018-10-26 21:30                       ` Bart Van Assche
2018-10-26 21:36                         ` Nick Desaulniers
2018-10-26 21:59                           ` Bart Van Assche
2018-10-26 22:07                             ` Nick Desaulniers
2018-10-26 22:24                               ` Bart Van Assche
2018-10-27 13:28                                 ` Martin K. Petersen
2018-10-28 15:44                                   ` Christoph Hellwig
2018-11-01  1:05                                   ` Boaz Harrosh
2018-10-27  3:35                               ` Theodore Y. Ts'o
2018-10-27  6:15                                 ` Bart Van Assche
2018-10-27  6:25                                   ` Nathan Chancellor
2018-11-01  1:15                   ` Boaz Harrosh
2018-11-01  1:39             ` Boaz Harrosh [this message]
2018-11-01  1:44               ` Nathan Chancellor
2019-01-26  6:47 ` [PATCH RESEND] " Nathan Chancellor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1c58c82f-5cfa-f483-097a-5b82904e5e9a@electrozaur.com \
    --to=ooo@electrozaur.com \
    --cc=bvanassche@acm.org \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=natechancellor@gmail.com \
    --cc=ndesaulniers@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).