Re: svn commit: r343349 - head/sys/dev/ocs_fc

2019-01-25 Thread Ram Kishore Vegesna via svn-src-all
Hi Rodney,

I fixed many coverity tool warnings as part of this commit. Adding all the
warnings and fix details seemed over kill.

I will use a better commit message when I do MFC commit of this revision.

Thanks,
Ram



On Thu, Jan 24, 2019 at 12:28 AM Rodney W. Grimes <
free...@pdx.rh.cn85.dnsmgr.net> wrote:

> > Author: ram
> > Date: Wed Jan 23 17:34:01 2019
> > New Revision: 343349
> > URL: https://svnweb.freebsd.org/changeset/base/343349
> >
> > Log:
> >   Fixed issues reported by coverity scan.
>
> The quality of this commit message is rather low,
> it should of at least included some details about
> what was wrong, why it was wrong, and how it was
> fixed.
>
> Thanks,
> Rod
> >
> >   Approved by: mav
> >   MFC after: 3 weeks
> >
> > Modified:
> >   head/sys/dev/ocs_fc/ocs_cam.c
> >   head/sys/dev/ocs_fc/ocs_hw.c
> >   head/sys/dev/ocs_fc/ocs_hw_queues.c
> >   head/sys/dev/ocs_fc/ocs_ioctl.c
> >   head/sys/dev/ocs_fc/ocs_mgmt.c
> >   head/sys/dev/ocs_fc/ocs_node.c
> >   head/sys/dev/ocs_fc/ocs_pci.c
> >   head/sys/dev/ocs_fc/ocs_xport.c
> >   head/sys/dev/ocs_fc/sli4.c
> >
> > Modified: head/sys/dev/ocs_fc/ocs_cam.c
> >
> ==
> > --- head/sys/dev/ocs_fc/ocs_cam.c Wed Jan 23 17:28:39 2019
> (r343348)
> > +++ head/sys/dev/ocs_fc/ocs_cam.c Wed Jan 23 17:34:01 2019
> (r343349)
> > @@ -1164,15 +1164,24 @@ ocs_scsi_del_target(ocs_node_t *node,
> ocs_scsi_del_tar
> >   struct ocs_softc *ocs = node->ocs;
> >   ocs_fcport  *fcp = NULL;
> >   ocs_fc_target_t *tgt = NULL;
> > - uint32_ttgt_id;
> > + int32_t tgt_id;
> >
> > + if (ocs == NULL) {
> > + ocs_log_err(ocs,"OCS is NULL \n");
> > + return -1;
> > + }
> > +
> >   fcp = node->sport->tgt_data;
> >   if (fcp == NULL) {
> >   ocs_log_err(ocs,"FCP is NULL \n");
> > - return 0;
> > + return -1;
> >   }
> >
> >   tgt_id = ocs_tgt_find(fcp, node);
> > + if (tgt_id == -1) {
> > + ocs_log_err(ocs,"target is invalid\n");
> > + return -1;
> > + }
> >
> >   tgt = >tgt[tgt_id];
> >
> > @@ -1781,13 +1790,9 @@ ocs_initiator_io(struct ocs_softc *ocs, union ccb
> *ccb
> >   ocs_io_t *io = NULL;
> >   ocs_scsi_sgl_t sgl[OCS_FC_MAX_SGL];
> >   int32_t sgl_count;
> > + ocs_fcport  *fcp;
> >
> > - ocs_fcport  *fcp = NULL;
> >   fcp = FCPORT(ocs, cam_sim_bus(xpt_path_sim((ccb)->ccb_h.path)));
> > - if (fcp == NULL) {
> > - device_printf(ocs->dev, "%s: fcp is NULL\n", __func__);
> > - return -1;
> > - }
> >
> >   if (fcp->tgt[ccb_h->target_id].state == OCS_TGT_STATE_LOST) {
> >   device_printf(ocs->dev, "%s: device LOST %d\n", __func__,
> > @@ -2250,8 +2255,11 @@ ocs_action(struct cam_sim *sim, union ccb *ccb)
> >   }
> >   case XPT_RESET_BUS:
> >   if (ocs_xport_control(ocs->xport, OCS_XPORT_PORT_OFFLINE)
> == 0) {
> > - ocs_xport_control(ocs->xport,
> OCS_XPORT_PORT_ONLINE);
> > -
> > + rc = ocs_xport_control(ocs->xport,
> OCS_XPORT_PORT_ONLINE);
> > + if (rc) {
> > + ocs_log_debug(ocs, "Failed to bring port
> online"
> > + " : %d\n",
> rc);
> > + }
> >   ocs_set_ccb_status(ccb, CAM_REQ_CMP);
> >   } else {
> >   ocs_set_ccb_status(ccb, CAM_REQ_CMP_ERR);
> >
> > Modified: head/sys/dev/ocs_fc/ocs_hw.c
> >
> ==
> > --- head/sys/dev/ocs_fc/ocs_hw.c  Wed Jan 23 17:28:39 2019
> (r343348)
> > +++ head/sys/dev/ocs_fc/ocs_hw.c  Wed Jan 23 17:34:01 2019
> (r343349)
> > @@ -242,10 +242,7 @@ ocs_hw_get_num_chutes(ocs_hw_t *hw)
> >  static ocs_hw_rtn_e
> >  ocs_hw_link_event_init(ocs_hw_t *hw)
> >  {
> > - if (hw == NULL) {
> > - ocs_log_err(hw->os, "bad parameter hw=%p\n", hw);
> > - return OCS_HW_RTN_ERROR;
> > - }
> > + ocs_hw_assert(hw);
> >
> >   hw->link.status = SLI_LINK_STATUS_MAX;
> >   hw->link.topology = SLI_LINK_TOPO_NONE;
> > @@ -1757,6 +1754,7 @@ ocs_hw_get(ocs_hw_t *hw, ocs_hw_property_e prop,
> uint3
> >   break;
> >   case OCS_HW_MAX_VPORTS:
> >   *value = sli_get_max_rsrc(>sli, SLI_RSRC_FCOE_VPI);
> > + break;
> >   default:
> >   ocs_log_test(hw->os, "unsupported property %#x\n", prop);
> >   rc = OCS_HW_RTN_ERROR;
> > @@ -1996,6 +1994,7 @@ ocs_hw_set(ocs_hw_t *hw, ocs_hw_property_e prop,
> uint3
> >   break;
> >   case OCS_ESOC:
> >   hw->config.esoc = value;
> > + break;
> >   case OCS_HW_HIGH_LOGIN_MODE:
> >   rc = sli_set_hlm(>sli, value);
> >   break;
> > @@ 

Re: svn commit: r332471 - head/sys/dev/ocs_fc

2018-04-17 Thread Ram Kishore Vegesna via svn-src-all
Thanks Oliver, For pointing the issue. Checked in the change.

-Ram

On Sat, Apr 14, 2018 at 3:32 AM, Oliver Pinter <
oliver.pin...@hardenedbsd.org> wrote:

>
>
> On Friday, April 13, 2018, Ram Kishore Vegesna  wrote:
>
>> Author: ram
>> Date: Fri Apr 13 13:31:20 2018
>> New Revision: 332471
>> URL: https://svnweb.freebsd.org/changeset/base/332471
>>
>> Log:
>>   Check if STACK is defined before using the stack(9).
>>
>>   PR: 227446
>>   Reported by: emaste
>>   Approved by: ken
>>
>> Modified:
>>   head/sys/dev/ocs_fc/ocs_os.c
>>
>> Modified: head/sys/dev/ocs_fc/ocs_os.c
>> 
>> ==
>> --- head/sys/dev/ocs_fc/ocs_os.cFri Apr 13 13:23:31 2018
>> (r332470)
>> +++ head/sys/dev/ocs_fc/ocs_os.cFri Apr 13 13:31:20 2018
>> (r332471)
>> @@ -37,6 +37,7 @@
>>   */
>>
>>  #include "ocs.h"
>> +#include "opt_stack.h"
>
>
> These types of includes - where you includes opts - should go before any
> other includes.
>
>
>
>>  #include 
>>  #include 
>>  #include /* for debug of memory
>> allocations */
>> @@ -855,11 +856,13 @@ void ocs_intr_enable(ocs_os_handle_t os)
>>
>>  void ocs_print_stack(void)
>>  {
>> +#if defined(STACK)
>> struct stack st;
>>
>> stack_zero();
>> stack_save();
>> stack_print();
>> +#endif
>>  }
>>
>>  void ocs_abort(void)
>> ___
>> svn-src-h...@freebsd.org mailing list
>> https://lists.freebsd.org/mailman/listinfo/svn-src-head
>> To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
>>
>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r332386 - head/share/misc

2018-04-12 Thread Ram Kishore Vegesna via svn-src-all
oho, my bad added to the wrong section. Will fix and update.

Ken, I will send you the patch.

Thanks,
Ram

On Wed, Apr 11, 2018 at 7:57 PM, Kenneth D. Merry  wrote:

> On Tue, Apr 10, 2018 at 14:27:26 -0500, Kyle Evans wrote:
> > On Tue, Apr 10, 2018 at 2:22 PM, Rodney W. Grimes
> >  wrote:
> > > [ Charset UTF-8 unsupported, converting... ]
> > >> Author: ram
> > >> Date: Tue Apr 10 18:39:20 2018
> > >> New Revision: 332386
> > >> URL: https://svnweb.freebsd.org/changeset/base/332386
> > >>
> > >> Log:
> > >>   Updated mentors information.
> > >>
> > >>   Approved by: ken, mav
> > >>
> > >> Modified:
> > >>   head/share/misc/committers-src.dot
> > >>
> > >> Modified: head/share/misc/committers-src.dot
> > >> 
> ==
> > >> --- head/share/misc/committers-src.dotTue Apr 10 18:05:02
> 2018(r332385)
> > >> +++ head/share/misc/committers-src.dotTue Apr 10 18:39:20
> 2018(r332386)
> > >> @@ -76,6 +76,7 @@ nate [label="Nate Willams\nn...@freebsd.org\
> n1993/06/1
> > >>  njl [label="Nate Lawson\n...@freebsd.org\n2002/08/07\n2008/02/16"]
> > >>  non [label="Noriaki Mitsnaga\n...@freebsd.org\
> n2000/06/19\n2007/03/06"]
> > >>  onoe [label="Atsushi Onoe\no...@freebsd.org\n2000/
> 07/21\n2008/11/10"]
> > >> +ram [label="Ram Kishore Vegesna\n...@freebsd.org\
> n2018/04/04\n???/??/??"]
> > >
> ^
> > > That should be removed, you only have a start date.
> > > Oh and Welcome ram to the project!
> > >
> >
> > The entry is also smack dab in the middle of the alumni section,
> > rather than the later 'active' section. =)
>
> Oops.  My fault for not paying attention. :(
>
> Pointy hat to:  ken
>
> Ram, could you fix this and send me the diffs for approval before you
> commit it?
>
> Thanks,
>
> Ken
> --
> Kenneth Merry
> k...@freebsd.org
>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"