[Open-FCoE] [PATCH] libfc: Fix compilation warnings with allmodconfig

Love, Robert W robert.w.love at intel.com
Thu Apr 16 18:52:27 UTC 2009


Leech, Christopher wrote:
> On Thu, Apr 16, 2009 at 11:38:29AM -0700, Robert Love wrote:
>> When building with a .config generated from 'make allmodconfig'
>> some build warnings are generated. This patch corrects the warnings,
>> adds a FC_FID_NONE (= 0) enumeration for FC-IDs and cleans up one
>> variable naming to meet our variable naming conventions. For example,
>> fc_lport's should be named "lport," not "lp."
>> 
>> Signed-off-by: Robert Love <robert.w.love at intel.com>
> 
>> @@ -535,7 +535,8 @@ static void fc_rport_plogi_resp(struct fc_seq
>> *sp, struct fc_frame *fp, 
>> 
>>  	op = fc_frame_payload_op(fp);
>>  	if (op == ELS_LS_ACC &&
>> -	    (plp = fc_frame_payload_get(fp, sizeof(*plp))) != NULL) {
>> +	    (plp = fc_frame_payload_get(fp,
>> +					sizeof(struct fc_els_flogi))) != NULL) {
>>  		rport->port_name = get_unaligned_be64(&plp->fl_wwpn);
>>  		rport->node_name = get_unaligned_be64(&plp->fl_wwnn);
>> 
> 
> Was there a warning fixed by this change?  I find the split long line
> uglier than the existing use of sizeof on a variable instead of a
> type. 
> 
Yeah, it did fix the compile warning and I agree with you that the split
line is obnoxious. Would initializing plp to NULL would be preferable?



More information about the devel mailing list